You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'add que(quedtion_te x)VALUES('')' at line 1
this my code
this my code
Code:
<html>
<head>
<title>
add question
</title>
<meta name="keywords" content="Web Tech Template, CSS, HTML" />
<meta name="description" content="Web Tech Template is a free CSS website provided by templatemo.com" />
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
<?php
error_reporting(0);
$quedtion_tex=$_POST['quedtion_tex'];
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("center_db", $con);
$sql="INSERT INTO add que(quedtion_tex)VALUES('$quedtion_tex')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
<form action="add que.php" method="post">
<p>
<input type="text" name="quedtion_tex">
<input type="submit" name="submit" value="add que" >
</p>
</body>
</html>
Comment