Posted by mars on 09/19/05 13:50
Darkstar 3D probably wrote the following stuff on 19/09/2005 1.58:
> Please post a couple of lines of the html source in the problem area.
> Geoff's change looks spot on to me.
>
ok, well I put this:
<form name="year_search_form" method="get" action="results.php">
<select name="select_year" id="select_year">
<?php
$num_rows = mysql_num_rows($result);
for ($count = 0; $count < $num_rows; $count++) {
$line = mysql_fetch_array($result);
print ("<OPTION value=".$line['year'].">".$line['year']."</OPTION>");}
?>
</select>
<input name="submit" type="submit" class="search_button" value="Search">
</form>
======
while just under it i displayed this to see if the sql query worked:
======
<?php
$line = mysql_fetch_array($result);
echo($line['year']);
while ($line = mysql_fetch_array($result)) {
print ("<br>".$line['year']); }
?>
and it outputs correctly the years contained in the table..
Thanks for your time!
Navigation:
[Reply to this message]
|