Click to See Complete Forum and Search --> : Select Option to Pull DB Table Where Option =...


flashhq
09-22-2006, 11:11 AM
Can't get results. I have a table row named server with values of 1, 2, 3, and 4.

I have a form
<form name="form1" method="post" action="index.php?do=listdoms&grr=searchit"> with a drop down select.
<select name="server" id="server">
<option name="Select Server">Select Server</option>
<option name="1">Server 1</option>
<option name="2">Server 2</option>
<option name="3">Server 3</option>
<option name="4">Server 4</option>
</select>

My select statement$opdracht="SELECT * from addressbook where server='$server'";
$opdracht.=" ORDER BY www";
I do get results. However if I select Server 2 from the dropdown I do not get recoreds where server =2
What am I missing?

chazzy
09-22-2006, 03:07 PM
your options have no values

Edit: to clarify, options shouldn't have names

mattyblah
09-22-2006, 03:49 PM
Like the above poster said, should be:

<option value="1">Text Here</option>