为什么数据不能写进数据库?
feirl 2004-02-10 09:49:33 这是插入数据的程序:
<?php
if (string.match(/^\w+@[\-a-zA-Z0-9]\.[A-Za-z]$/is)&&($textfield!
="")
{
$sql=mysql_connect("localhost","web@localhost","5207938");
mysql_query("insert into web_email(name) values ('$textfield')");
?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>程序</title>
</head>
<body>
加入成功!!!.请返回.<a herf='index.php'>index.php</a>
</body>
</html>
<?php
}
else{
echo "<BR>对不起你的输入有错,请重新输入<BR>";
}
?>
结果是数据不能写入,但浏览器也没有报错。只是一片空白!???为什么?