ohdang888 Posted November 14, 2008 Share Posted November 14, 2008 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Testing app', '2008-11-14 18:04:03')' at line 1 mysql_query("INSERT INTO `page_admins` (`user_id`, `page_id`, `page_name`, `date`)VALUES('$user', '$page_id', '$page_name', '$date') ")or die(mysql_error()); any ideas??? thanks! Quote Link to comment https://forums.phpfreaks.com/topic/132770-solved-error/ Share on other sites More sharing options...
MasterACE14 Posted November 14, 2008 Share Posted November 14, 2008 can you post the values that your inserting. Quote Link to comment https://forums.phpfreaks.com/topic/132770-solved-error/#findComment-690487 Share on other sites More sharing options...
ohdang888 Posted November 14, 2008 Author Share Posted November 14, 2008 $page_id = mysql_real_escape_string($_GET['page_id']); $page_name = mysql_real_escape_string($_GET[''page_name]); if(empty($page_name) or empty($page_id)){ die("Page does not exist"); } $date = date("Y-m-d H:i:s"); mysql_query("INSERT INTO `page_admins` (`user_id`, `page_id`, `page_name`, `date`)VALUES('$user', '$page_id', '$page_name', '$date') ")or die(mysql_error()); } user is pre-defined.... all the values exist.... the page name in this case is " Tommy's testing app" Quote Link to comment https://forums.phpfreaks.com/topic/132770-solved-error/#findComment-690501 Share on other sites More sharing options...
.josh Posted November 14, 2008 Share Posted November 14, 2008 $_GET[''page_name] Quote Link to comment https://forums.phpfreaks.com/topic/132770-solved-error/#findComment-690502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.