Query is always fails using php
<p>I am trying to INSERT students answers to a Table online_exam_marks whose structure is <img src="https://i.stack.imgur.com/uSiB0.png" alt="enter image description here">  </p>

<p>. I took $_POST values and stored in different variable like <code>$a,$b,...</code>  and <code>$stu_id = $_SESSION["id"];</code>
perform a query </p>

<pre><code>$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"; 
</code></pre>

<p>when executed this it always prints error.
Please help.</p>