Lambneck Posted August 28, 2008 Share Posted August 28, 2008 This form is sending the wrong info to database. When selecting the specific country (America, Canada, or Britain) it shows up in the database as "country". $country = $_POST['country']; <INPUT TYPE="radio" Name="country" VALUE="America">America<br> <INPUT TYPE="radio" Name="country" VALUE="Canada">Canada<br> <INPUT TYPE="radio" Name="country" VALUE="Britain">Britain<br> What am I doing wrong? Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/ Share on other sites More sharing options...
rhodesa Posted August 28, 2008 Share Posted August 28, 2008 where is the code for the SQL query to update the DB? my guess is that is wrong... Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/#findComment-628117 Share on other sites More sharing options...
ratcateme Posted August 28, 2008 Share Posted August 28, 2008 can we see you INSERT command? Scott. Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/#findComment-628118 Share on other sites More sharing options...
Lambneck Posted August 28, 2008 Author Share Posted August 28, 2008 mysql_query("INSERT INTO $table (col_1, col_2, col_3, col_4, col_5, col_6, col_7, col_8, col_9, col_10, col_11, col_12, col_13, submission_date, ip_address) VALUES ('country', '$compname', '$compadd', '$billname', '$billadd','$phone','$email','$cardnum','$cardtype','$cardexp','$instructions','$subject','$message', '$submission_date','$ip')")or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/#findComment-628123 Share on other sites More sharing options...
BlueSkyIS Posted August 28, 2008 Share Posted August 28, 2008 fixed missing dollar sign: mysql_query("INSERT INTO $table (col_1, col_2, col_3, col_4, col_5, col_6, col_7, col_8, col_9, col_10, col_11, col_12, col_13, submission_date, ip_address) VALUES ('$country', '$compname', '$compadd', '$billname', '$billadd','$phone','$email','$cardnum','$cardtype','$cardexp','$instructions','$subject','$message', '$submission_date','$ip')")or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/#findComment-628125 Share on other sites More sharing options...
Lambneck Posted August 28, 2008 Author Share Posted August 28, 2008 damn it... Thank you! Link to comment https://forums.phpfreaks.com/topic/121757-solved-radio-buttons/#findComment-628130 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.