-3

when i run the following i get parse error. im a noob btw

   <?php
//Connecting to sql db.
$connect = mysqli_connect("localhost","root","","dbname");
//Sending form data to sql db.
mysqli_query($connect,"INSERT INTO `as_questions`(`Qid`, `M_class`, `S_class`,`Question`, `Answer`, `Doctor`, `Time`) VALUES
('n','n','n','q','a','d','')";?>
  • 1
    Looks like you're missing a closing `)`, i.e. `mysqli_query($connect,"INSERT INTO `as_questions`(`Qid`, `M_class`, `S_class`, `Question`, `Answer`, `Doctor`, `Time`) VALUES ('n','n','n','q','a','d','')");` – Mikey Jan 30 '16 at 17:39

1 Answers1

0

You forgot )

//Connecting to sql db.
$connect = mysqli_connect("localhost","root","","dbname");
//Sending form data to sql db.
mysqli_query($connect,"INSERT INTO `as_questions`(`Qid`, `M_class`, `S_class`, `Question`, `Answer`, `Doctor`, `Time`) VALUES
('n','n','n','q','a','d','')");
Radek Adamiec
  • 502
  • 3
  • 10