Hi,
I have a page of items that is being populated via a database with a checkbox next to each item. I need to be able to keep track of each itemid so I can use this for the checkbox name...and then these checkbox name variables need to be defined into a new function.
My problem is that the checkbox name keeps being overridden by a prior itemid so I only end up with one variable name. Should I define each id into an array?
Here is my code to generate the list on the page...
//Search for academic clubs
$query = "SELECT * FROM so_clubs WHERE so_active='1' AND so_category='sports' ORDER BY so_name";
$results = mysql_query($query);
while ($row = mysql_fetch_array($results)) {
$clubid = $row["so_clubid"];
$name = $row["so_name"];
$website = $row["so_website"];
$name = stripslashes($name);
$website = stripslashes($website);
?>
<form action="<?php echo $PHP_SELF; ?>?action=submit" method=post>
<INPUT TYPE="checkbox" name="<?php $clubid ?>" value="1"> <a href="<?php echo ''.$PHP_SELF.'?action=display_info&clubid='.$clubid ?>"><?php echo $name ?></a><br>
<?php
}