Reply to Re: very simple drop-down list...

Your name:

Reply:


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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация