Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

[PHP3] setting hidden values in forms From: Daren Sefcik (daren <email protected>)
Date: 03/17/99

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>