Reply to Re: select box

Your name:

Reply:


Posted by Peter revera on 01/11/07 15:23

On Thu, 11 Jan 2007 15:11:37 +0000, Geoff Berrow
<blthecat@ckdog.co.uk> wrote:

>Message-ID: <g6kcq211hinohaqm5kls2qve4ki50duab6@4ax.com> from Peter
>revera contained the following:
>
>>$get = "SELECT * FROM categories";
>>$answer = mysql_query($get)
>>or die ("Couldn't execute query.");
>>
>> echo "<select name=listid' class='gradientform'>\n";
>> while ($row = mysql_fetch_array($answer))
>> {
>> extract($row);
>> echo "<option value='$itemid'>$item\n";
>> }
>> echo "</select>\n";
>
>$get = "SELECT * FROM categories";
>$answer = mysql_query($get)
>or die ("Couldn't execute query.");
>
> echo "<select name=listid' class='gradientform'>\n";
> while ($row = mysql_fetch_array($answer))
> {
> extract($row);
>
> $selected=(isset($_GET['listid']) &&$_GET['listid']==$itemid)?"
>selected":"";
> echo "<option value='$itemid'$selected>$item</option>\n";
> }
> echo "</select>\n";


Ive added the code and when I view the form with the variable pased in
the url the select list hasnt changed. It just defaults to the normal
order.

[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

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