Re: Variable from PHP to HTML...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>
><form name="form1" method="post" action="">
><table border="0" align="center">
>   <?php do {
>     $sys = $system['Name'];
>     if ($cnt == 1) {
>         $cnt = 2;
>         echo "<tr>"; ?>
>     <td width="161"><input name="$sys" type="checkbox" value="name">
>       <?php echo $sys; ?></td>

Your input box should be the following:
><input name="sys" type="checkbox" value="name">


The $ isn't necessary in the HTML code since HTML doesn't really recognize 
this as a variable. When the form is passed to the action page, the code in 
the action page (in this case PHP) creates a variable named whatever the 
name attribute in the HTML code holds - in this case sys.

-Lisi


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux