- 1,645
Okay, so I'm going to try to explain my problem without a whole lot of lead-up to the problem. Basically what I have is a MySQL function that goes through a table and creates option boxes for each entry in the table:
The end goal is for a list of games to be presented in a form so that a user can select one and the value of the selected option will pass through to another table when they click the Submit button. As I have it right now, the value won't pass. I'm thinking using the option circles won't work, so if anyone has any other ideas I would be very grateful. I was planning on using the "name" attribute as I did with my text fields, but 'options' don't have a name attribute and value doesn't really work.
So yeah, any help would be greatly appreciated. Thanks!
Also, if this is in the wrong forum, I apologise. It could go either Progamming or Web I suppose.
Code:
function retrieveGames() {
$gamesList = mysql_query("SELECT * FROM mgsf_games WHERE id > 0 ORDER BY `id` DESC");
while($row = mysql_fetch_array($gamesList)) {
echo("<input name='gameTitle' type='radio' value='".$row['url']."'> <strong>".$row['name']."</strong><br />");
}
}
The end goal is for a list of games to be presented in a form so that a user can select one and the value of the selected option will pass through to another table when they click the Submit button. As I have it right now, the value won't pass. I'm thinking using the option circles won't work, so if anyone has any other ideas I would be very grateful. I was planning on using the "name" attribute as I did with my text fields, but 'options' don't have a name attribute and value doesn't really work.
So yeah, any help would be greatly appreciated. Thanks!
Also, if this is in the wrong forum, I apologise. It could go either Progamming or Web I suppose.