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

$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;

Open in new window

database-image.jpg
database-field-image.jpg
LVL 1
Rcollins207Asked:
Who is Participating?
 
Lukasz ChmielewskiCommented:
$query="UPDATE wp_postmeta SET fontpagetest='$chkboxestest' WHERE post_id='$chkboxesID'";
:)
0
 
Lukasz ChmielewskiCommented:
frontpagetest
FONT, not front
0
 
Aaron TomoskySD-WAN SimplifiedCommented:
Nice catch roads. I looked at that for a good 5 min and my eyes lied to me
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
svgmucCommented:
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.
0
 
Lukasz ChmielewskiCommented:
I was just lucky :P
0
 
Rcollins207Author Commented:
OMG thanks GJ i played around with that for ages lol
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.