I am trying to INSERT students answers to a Table online_exam_marks whose structure is
. I took $_POST values and stored in different variable like $a,$b,...
and $stu_id = $_SESSION["id"];
perform a query
$sql = "INSERT INTO online_exam_marks (stu_id , 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) VALUES ( '$stu_id' ,'$a', '$b','$c','$d','$e','$f','$g','$h','$i','$j')";
if(mysqli_query($con,$sql))
{
render("success.php");
}
else echo "error";
when executed this it always prints error. Please help.