sql语法问题
<?$conn=@mysql_connect("localhost","root","")or die("数据库链接错误");
mysql_select_db("book",$conn);
mysql_query("set names 'GBK'");
if($_POST['submit'])
(
$sql="insert into book (id,name,writer,class,price) values('$_POST[id]','$_POST[name]','$_POST[writer]','$_POST[class]','$_POST[price]')";
mysql_query($sql);
echo "success";
)
?>
<form action="" method="post">
书号:<input type="text" size="10" name="id"><br>
书名:<input type="text" size="20" name="name"><br>
作者:<input type="text" size="10" name="writer"><br>
类别:<input type="text" size="10" name="class"><br>
价格:<input type="text" size="10" name="price"><br>
<input type="submit" name="submit" value="增加图书"><br>
</form>
老是提示画线部分出错。。。可是觉得没有问题啊