Link to home
Start Free TrialLog in
Avatar of wantabe2
wantabe2Flag for United States of America

asked on

PHP Code

The code below is part of a form that fulls data from a mysql database & displays that information in a browser. As you can see in the code, it pulls the employee name. My question is, is there any way I can edit this line of code that will allow me to add a drop down box that shows the other employees but keep the employee it pulls from the mysql database default?
<b>Employee: </b><br><input type="text" name="employee" size="15" maxlength="30" option value="'.$row[4].'" /> <br>

Open in new window

Avatar of leakim971
leakim971
Flag of Guadeloupe image

Check this : http://www.phpro.org/tutorials/Dropdown-Select-With-PHP-and-MySQL.html

build your dropdown first and use :

$dropdown = dropdown(...,....,..

echo '<b>Employee: </b><br><input type="text" name="employee" size="15" maxlength="30" option value="' . $row[4] . '" />' . $dropdown . '<br>';

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial