Hi guys i am trying to insert some data to my database but when i run the query it says to me select failed.
Here is the php code:
<?php
$q1=$_POST['q1'];
$q2=$_POST['q2'];
$q3=$_POST['q3'];
$q4=$_POST['q4'];
$q5=$_POST['q5'];
$q6=$_POST['q6'];
$q7=$_POST['q7'];
$q8=$_POST['q8'];
$q9=$_POST['q9'];
$q10=$_POST['q10'];
$q11=$_POST['q11'];
$q12=$_POST['q12'];
$q13=$_POST['q13'];
$q14=$_POST['q14'];
$q15=$_POST['q15'];
$q16=$_POST['q16'];
mysql_pconnect("localhost","root","")
or die("Unable to connect to SQL server");
@mysql_select_db("questionary")
or die("Unable to select database");
$query="INSERT INTO questions VALUES
('$q1','$q2','$q3','$q4','$q5','$q6','$q7','$q8','$q9','$q10','$q11','$q12','$q13','$q14','$q15','$q16')";
$result = mysql_query($query) or die("Select Failed!");
?>
plz help me with this because i am on hurry for a project thanks a lot