php3-list | 199903

Re: [PHP3] setting hidden values in forms From: Richard Lynch (lynch <email protected>)
Date: 03/17/99

It doesn't belong *INSIDE* the <select></select>

It's a separate INPUT from the SELECT which is totally different.

>I need to have the $col1 value of the *currently selected* item in
>the below example code passed to the next form, but what I get instead
>is the last result from the query.I am using a hidden field
>since I already use the <select name= > value for something else.
>If I place it inside the while loop it does the same AND it hoses IE4
>but not NN4.
>
>Do I need to place this somewhere else or I am just
>doing it completely wrong..??
>
>TIA
>Daren
>
>
>echo "<tr><td><select name=basecpu>\n";
>while ($i < $numrow)
> {
> $col1=mysql_result($result, $i, ProductDescription);
> $col2=mysql_result($result, $i, UnitPrice);
> if($basecpu==$col2)
> echo "<option value=$col2 SELECTED>$col1 &nbsp
>\$$col2</option>\n";
> else
> echo "<option value=$col2 >$col1 &nbsp
>\$$col2</option>\n";
>
> $i++;
> }
> echo "<input type=hidden value=\"$col1\" name=basedesc>\n";
> echo "</select></td></tr>";
>
>--
>PHP 3 Mailing List http://www.php.net/
>To unsubscribe send an empty message to php3-unsubscribe <email protected>
>To subscribe to the digest list: php3-digest-subscribe <email protected>
>For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
>List administrator: zeev-list-admin <email protected>

-- "TANSTAAFL" Rich lynch <email protected> webmaster@ and www. all of:
R&B/jazz/blues/rock - jademaze.com music industry org - chatmusic.com
acoustic/funk/world-beat - astrakelly.com sculptures - olivierledoux.com
my own nascent company - l-i-e.com cool coffeehouse - uncommonground.com

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>