为什么数据不能写进数据库?

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>";
}
?>

结果是数据不能写入,但浏览器也没有报错。只是一片空白!???为什么?
...全文
52 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧