Lines of sql code:
$uid=$_POST["uid"];
$mobile=$_POST["mobile"];
$service=$_POST["service"];
$exper=$_POST["exper"];
$range=$_POST["range"];
$af=$_POST["a_from"];
$at=$_POST["a_to"];
$min_charge=$_POST["min_charge"];
$statement=mysqli_prepare($con,"INSERT INTO service (uid,mobile,service,exper,range,a_from,a_to,min_charge) VALUES (?,?,?,?,?,?,?,?)");
mysqli_stmt_bind_param($statement,"iisiiiii",$uid,$mobile,$service,$exper,$range,$af,$at,$min_charge);
mysqli_stmt_execute($statement);
$response=array();
$response["success"]=true;
echo mysqli_error($con);
echo json_encode($response);
Everything is ok, and I don't get any syntax error when I write the code (I am using a code editor software. However, when I use it online, I get this error:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'range,a_from,a_to,min_charge) VALUES (?,?,?,?,?,?,?,?)'