Jump to content

You have an error in your SQL syntax


$php_mysql$

Recommended Posts

whenever i try to insert data like

 

$page = $_GET['page'];
if(!$page >= 1){
$page = 1;
}
$records_per_page = 5;
if($page == 1)
$first_record = 0;
else{
$first_record = (($page - 1) * $records_per_page );
}

 

in my form get the error message

 

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 'page']; if(!$page >= 1){ $page = 1; } $records_per_page = 5; if($page == 1)' at line 11

 

but else my form works fine even if i insert html tags in the textarea field, what could be causing this?

Link to comment
https://forums.phpfreaks.com/topic/244430-you-have-an-error-in-your-sql-syntax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.