Hello,<br><br>I have a searchform where i want to be able to search for persons who are married and display the selected records in a table. That's going o.k.<br>But if i don't check the checkbox, there has to be a 'zero' value so that all the records in the database will be displayed. What am i doing wrong (or what am i missing) in the following code to produce such a form?<br>Thanks in advance,<br><br>Joep<br>------------------------------------------------<br><html><br><body><br><?<br>$db = mysql_connect("localhost", "username", "password"<br>mysql_select_db("database",$db);<br><br>if ($submit)<br>for($i=0;$i<count($married);$i++)<br>{<br> $sql = "SELECT * FROM employees WHERE married = '$married'";<br> $result = mysql_query($sql);<br><br>echo "<table border=1>\n";<br>echo<br>"<tr><td>Name</td><td>Adres</td><td>Children</td><td>Income</td></tr>\n";<br>while ($myrow = mysql_fetch_array($result)) {<br>printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",<br>$myrow[Name], $myrow[Adres], $myrow[Children], $myrow[Income]);<br>}}<br><br>?><br><br><P><br><form method="post" action="<? echo $PHP_SELF?>"><br>Married? <input type=checkbox name="married" value=y> Yes <br><br><input type="Submit" name="submit" value="Search"><br></form><br></body><br></html><br><br>