Use text in Combobox for Mysql (1 Viewer)

coolcatkelso

Registered User.
Local time
Today, 15:25
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
 

plog

Banishment Pending
Local time
Today, 09:25
Joined
May 11, 2011
Messages
11,658
Your option elements need a value attribute:

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







 

Users who are viewing this thread

Top Bottom