主题:【江湖救急】熟悉PHP+MYSQL的朋友帮个忙 -- 无情
55555555555,第一次用这个,一直报错,555555555
说是第14行错了,各位帮个忙哦......
{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Php</title>
</head>
<body>
<?php
$dbcnx = mysql_connect("localhost","root","") or die ("cannot connect to DB");
$sql= mysql_select_db("giohot") or die ("cannot select DB");
$sql = "INSERT INTO gio(Name, Street, City, State, Tel, Email, UName, Password ) VALUES ('$name', '$street', '$city','$state','$tel', '$email', 'username', 'password')";
$result = mysql_query($strsql, $query) or die ("Cannot execute query");
if
(!$sql_result) { echo "Cannot add record"; }
else
{ echo "Record added"; };
mysql_close($connect);
?>
</body>
</html>
}
- 相关回复 上下关系5
☹️【江湖救急】熟悉PHP+MYSQL的朋友帮个忙
$strsql, $query 两个变量是在哪里定义的? pdwolf 字0 2004-10-14 01:45:29
mysql_query ppw 字214 2004-10-09 17:21:38
😥$result = mysql_query 无情 字147 2004-10-09 17:28:31
$result=... ppw 字200 2004-10-09 17:52:40