Code: Select all
//for the GROUPING
//================
mysql_select_db($dbname);
$sql = "SELECT * FROM grouping ORDER BY group_id ASC";
$content = mysql_query($sql);
$Xcontent = mysql_fetch_array($content);
$cShowMax = mysql_num_rows($content);
for ($y=1; $y<=$cShowMax; $y++)
{
$group_id = $Xcontent["group_id"];
$group_name = $Xcontent["group_name"];
$group_type = $Xcontent["group_type"];
echo "<td align = \"center\"><input name=\"$group_name\" type=\"checkbox\" value=\"$group_id\" checked /><br />$group_name</td>";
$Xcontent = mysql_fetch_array($content);
}
mysql_free_result($content);
?>This works a treat and draws a whole bunch of checkboxes (pre-checked) and when I refresh the form, yes, there are all the names in the url. Here is an example url (trimmed down to only show the checkbox data):
Code: Select all
&Hulabaloo=13&Beauty+Products=14&Beauty+Services=15&Beauty+Rent=16&Cutting=17&Colour=18&Training=19&Treatments=20&Makeup=25&Makeup+Service=26Whilst I could setup a whole bunch of $_GET's this won't really get me anywhere as the user can change those group names at will, including deletion or adding of new ones (as many as they'd like).
How can I get around this? I really feel very stuck!!!
All ideas greatly appreciated,
Rob