Find Jobs
Hire Freelancers

PHP Mysql Example

$30-250 USD

Complété
Publié il y a environ 15 ans

$30-250 USD

Payé lors de la livraison
I need a script made so i can use it as an example that I can use to code other pages with similar needs. I need this today. So bid now if you can do it this NOW! I have a drop down menu that gets its values from a Mysql database and table called via. What I want to do is once someone chooses the company they want it will give me the phone number and email that is in the database for that company on the same page. here si what I got so far. The menu is getting the Company name form the table but I can not get it to show the specific Company Phone Number and Email for that company. All I can get is the first entry in the table called via. But I need it to change to show the company that is chosen by the dro down menu. This what I have - I am trying to learn basic things so I need soem help with this.. <? $dbhost = "localhost"; $dbname = "name"; $dbuser = "user"; $dbpass = "pass"; mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname); $sql="select * from via"; $result=mysql_query($sql); $zeile = mysql_fetch_array($result); ?> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <?php $query5 = "select * from via ORDER BY Customer_Company"; echo "<select name=\"Customer_Company\">"; $result5 = mysql_query($query5); echo "<OPTION selected>$Customer_Company"; while ($row=mysql_fetch_array($result5)) { $Customer_Company=$row["Customer_Company"]; echo "<option>$Customer_Company"; } echo "</select>"; ?> <br /> <input type="submit" name="button" id="button" value="Search by Customer Name" /></form> //Then I want to have it add to my html page the Phone number and email on the same page below it.// Customer Phone Number: <?php echo "$zeile[Customer_Phone_Number]" ?> Customer Email: <?php echo "$zeile[Customer_Email_Number]" ?> // this entry works but only shows the first record in the table I need it to show the Phone and Email for the company that was selected from the drop down.// Stephen Bryant
N° de projet : 373812

Concernant le projet

9 propositions
Projet à distance
Actif à il y a 15 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
Décerné à :
Avatar de l'utilisateur
It's done, please check your PMB for see it working. Thanks. Leo.-
$30 USD en 0 jour
5,0 (105 commentaires)
6,6
6,6
9 freelances proposent en moyenne $32 USD pour ce travail
Avatar de l'utilisateur
quick pro help
$50 USD en 1 jour
4,9 (757 commentaires)
8,3
8,3
Avatar de l'utilisateur
I can help you. I can write code to show "phone" and other details.
$30 USD en 1 jour
5,0 (1531 commentaires)
7,8
7,8
Avatar de l'utilisateur
Please check PMB. jexplorer
$30 USD en 0 jour
4,9 (170 commentaires)
7,2
7,2
Avatar de l'utilisateur
Hello. Let me help you. Pls, check PMB. Thnx.
$30 USD en 0 jour
5,0 (215 commentaires)
6,3
6,3
Avatar de l'utilisateur
Ready to start! Please check PMB
$30 USD en 1 jour
5,0 (35 commentaires)
5,8
5,8
Avatar de l'utilisateur
Will complete quikcly.
$30 USD en 0 jour
5,0 (29 commentaires)
5,6
5,6
Avatar de l'utilisateur
I can do this
$30 USD en 1 jour
4,8 (26 commentaires)
4,7
4,7
Avatar de l'utilisateur
Hello. I will do my best to help you. Thanks.
$30 USD en 1 jour
4,9 (23 commentaires)
4,1
4,1

À propos du client

Drapeau de UNITED STATES
LaFargeville, United States
5,0
22
Méthode de paiement vérifiée
Membre depuis oct. 30, 2005

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.