so if the name of radio is "priority" then it needs not be checked for its value other than it being empty? or could i say put that one of those is defaulted to checked...
<input type="radio" value="this is a general post?" checked>this is a general post ..... then do in the php script something like: <?php if(!empty($priority)) { insert into table values(NULL, '$name', '$post', '$priority')")||die(mysql_error()); else { ?> <html> <head> <title>There was an error in your form submission</title> </head> <body> there was an error in your submitted form: you didnt choose a message priority. <a href="postprayer.htm">click here</a> to go back to the form to re-enter your post. </body> </html> <?php } //finnish script here.. ?> ----- Original Message ----- From: "Dennis Cole" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 1:29 AM Subject: RE: [PHP] radio buttons > Using a case statment would be the easyest way to tell which one was > checked, but technicly one could check all three unless the value of name is > changed the same like ... > > <input type="radio" name="priority" value="this is a general > statement?">this > is a general post > <input type="radio" name="priority" value="this is an urgent message">this > is > an urgent post > <input type="radio" name="priority" value="this is bothering me">this is a > message i need to post because it bothers me > > > -----Original Message----- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 1:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP] radio buttons > > > oh sorry i forgot in the last message too.. > > he wants 3 radio buttons on a form .. something to the affect of: > <input type="radio" name="general" value="this is a general statement?">this > is a general post > <input type="radio" name="urgent" value="this is an urgent message">this is > an urgent post > <input type="radio" name="concern" value="this is bothering me">this is a > message i need to post because it bothers me > > would this be the right setup for radio buttons and if so what is the best > way to tell what one of them is checked without using lots of if else > statements or is that unavoidable? > > or is there even a better way to set up radio buttons altogether... i havent > worked with radio buttons all that much and dont know that much about them > as far as php goes... > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php