Hi - I'm trying to set up a course registration process using php3 and mysql. Each course has 3 possible prices. The code to produce the course list in form format with radio buttons is in a while loop and looks like this:
print "<table width=\"75%\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n";
print "<tr>\n<td width=\"74%\">$courName </td>\n";
print "<td colspan=\"2\" width=\"26%\">To register, select applicable rate:</td>\n</tr>\n";
print "<tr>\n<td width=\"74%\">$courInstruct </td>\n";
print "<td colspan=\"2\" width=\"26%\"><input type=\"radio\" name=course$courID value=Regular>$$priceRegular</td>\n</tr>\n";
print "<tr>\n<td width=\"74%\">$timesDate </td>\n";
print "<td colspan=\"2\" width=\"26%\"><input type=\"radio\" name=course$courID value=Team>$$priceTeam Team</td>\n</tr>\n";
print "<tr>\n<td width=\"74%\">$courDesc </td>\n";
print "<td colspan=\"2\" width=\"26%\"><input type=\"radio\" name=course$courID value=Retired>$$priceRetired Retired</td>\n</tr>\n</table>\n<p> </p>\n";
}
That's all fine, but in the next step I have to make sure a course has been selected. How do I run through the radio button name variables $course1, $course2, etc to see if they contain data?
I realize that this might not be the clearest explaination ever, but any help you could provide would be great. Thanks!