Rcollins207
asked on
PHP SQL error PLEASE HELP ME!!
the error im getting is Unknown column 'frontpagetest' in 'field list'
My data base structure is in the image...
Sorry guys im new to PHP so explain like you would a 5 year old LOL :P
database-field-image.jpg
My data base structure is in the image...
Sorry guys im new to PHP so explain like you would a 5 year old LOL :P
$chkboxestest = $_POST['chkboxestest'];
$chkboxesID = $_POST['chkboxesID'];
if ($chkboxestest == '1') {
$dblink2 = mysql_connect("localhost", "username", "password");
mysql_select_db("mul23072_wrdp2",$dblink2);
$query="UPDATE wp_postmeta SET frontpagetest='$chkboxestest' WHERE post_id='$chkboxesID'";
mysql_query($query) or die(mysql_error());
echo $chkboxestest;
echo $chkboxesID;
database-image.jpgdatabase-field-image.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Nice catch roads. I looked at that for a good 5 min and my eyes lied to me
Your column is named fontpagetest.
In your code, you add an r to the name, making it fRontpagetest.
That's why it doesn't work.
In your code, you add an r to the name, making it fRontpagetest.
That's why it doesn't work.
I was just lucky :P
ASKER
OMG thanks GJ i played around with that for ages lol
FONT, not front