rasta876 Posted August 30, 2007 Share Posted August 30, 2007 I would like to update the column called Checked in my database with the following code. The problems is the value received by the line $cbox0=$_POST['cbox0']; example cbox=yes is not being inputted in the database. I think the problem lies with Checked='$cbox' because when I change it to Checked='yes' the value goes into the database. Could someone let me know what Im doing wrong $cbox0=$_POST['cbox0']; $inserter = "UPDATE checkbox SET Checked='$cbox0' WHERE Name='cbox1' "; mysql_query($inserter); thanks. Link to comment https://forums.phpfreaks.com/topic/67354-php-and-mysql-input/ Share on other sites More sharing options...
nathanmaxsonadil Posted August 30, 2007 Share Posted August 30, 2007 before you query it why don't you echo it. Link to comment https://forums.phpfreaks.com/topic/67354-php-and-mysql-input/#findComment-337903 Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 print $inserter; mysql_query($inserter) OR die(mysql_error());[code] [/code] Link to comment https://forums.phpfreaks.com/topic/67354-php-and-mysql-input/#findComment-337912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.