Use text in Combobox for Mysql

coolcatkelso

Registered User.
Local time
Today, 03:42
Joined
Jan 5, 2009
Messages
279
Hi guys

Got my table working ok now, but having a slight problem with this one. I did have a standard text box for "Employee" and have the user enter their name, now I have opted for a drop down menu instead, but when I select a user, Mysql returns blank

PHP:
?> 
<h1>Employee Time Sheet</a> </h1>
<hr> 
<form method="post" action=""> 
Employee Name:  <br>
<select name="EmployeeName">
  <option>SELECT</option>
  <option>HLodge</option>
  <option>RSeymour</option>
  <option>DRoberson</option>
  <option>MTaylor</option>
</select>
<br>
Customer Ref: <br>
    <input type="text" name="CustomerID">
    <br>
    Date: <br>
    <input type="text" name="JobDate">

I know I'm missing a bit of code to make it work, but can't find much on google for sql & combo
 
Your option elements need a value attribute:

<option value="HLodge">HLodge</option>







 

Users who are viewing this thread

Back
Top Bottom