Variable next to variable question...
| From: | Jeff Lewis | Date: | Wed, 11 Jul 2001 19:01:05 +0000 |
| Subject: | Variable next to variable question... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57472@lists.php.net to get a copy of this message | ||
Looks like I should have been keeping a close eye on that thread... I am pulling fields from a
database and displaying them on my page. I am adding a checkbox next to the name and storing the
name in the checkbox value. Anyway, on submission I want to process them but am having problems...
<?
$tox=0;
$fromx=0;
while(($row = mysql_fetch_object($to_bat_result))){
$to_bat_position=$row->position;
$to_bat_name=$row->name;
$to_bat_ch=$row->ch;
$to_bat_ph=$row->ph;
$to_bat_sp=$row->sp;
$to_bat_age=$row->age;
$tox=$tox+1;
echo '<tr><td><input type="checkbox"
name="$to['.$tox.']"
value="'.$to_bat_name.'"></td><td>'.$to_bat_position.'</td><td>'.$to_bat_name.'</td><td>'.$to_bat_ch.'</td><td>'.$to_bat_ph.'</td><td>'.$to_bat_sp.'</td><td>'.$to_bat_age.'</td></tr>';
}