I have been trying to input data from $_Post variables but I cannot spot where the error is? Hope you can help me. Below is the code:
$conn = mysql_connect("localhost", "root");
if (isset($_POST['studLog'])) {
 $uName = $_POST['uName'];
 $pWord = $_POST['pWord'];
 mysql_select_db("sis_main", $conn);
 if (mysql_num_rows(mysql_query("SELECT * from student where stud_uname='$uName' and stud_pword='$pWord'"))) {
  include("stud-view.html");
 } else {
  echo 'Account doesnt exist!';
  echo "<br><br>";
  echo "<a href='stud-start.html'>GO BACK!</a>";
 }
} else if (isset($_POST['studReg'])) {
 mysql_select_db("sis_main", $conn);
 $stdID = $_POST['studID'];
 $fname = $_POST['firstNme'];
 $mname = $_POST['midNme'];
 $lname = $_POST['lastNme'];
 $stadd = $_POST['stAdd'];
 $ctadd = $_POST['ctAdd'];
 $bdate = $_POST['bDate'];
 $gendr = $_POST['gender'];
 $email = $_POST['email'];
 $mobno = $_POST['mobNum'];
 $uname = $_POST['newUName'];
 $pword = $_POST['newPWord'];
 $age = birthday($bdate);
 if (mysql_query("INSERT INTO student values (`$stdID`,`$fname`,`$lname`, `$mname`,`$stadd`,`$ctadd`,`$age`,`$bdate`,`$gendr`, `$email`,`$mobno`,`$uname`,`$pword`);")) {
  echo 'Account Successfully Regsitered!';
 } else {
  echo 'ERROR: '.mysql_error();
  echo "<a href='stud-start.html'>GO BACK!</a>";
 }
}
}
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 '@gmail.com, 09981744039, kuyschan, kuyschan)' at line 1
 
     
    