PHP语句 Parse error: syntax error, unexpected '$result' (T_VARIABLE) in D:\xampp\htdocs\。。。
trim($name);trim($password);$_post["name"];$_post["password"];if(!$name||!$password){...
trim($name);
trim($password);
$_post["name"];
$_post["password"];
if(!$name || !$password )
{
echo "Your have not enter your detail message";
exit;
}
////数据库的连接
$db = mysql_pconnect($Host, $DbaUser,$DbaPassword);
if(!$db)
{
echo "Error: Could not connect to database.Please try again.";
exit;
}
//选择数据库
mysql_select_db($Database,$db);
//插入
$query = "INSERT INTO user VALUES ('','$name','$password');"
//结果
$result = mysql_query($query);
if($result)
{
///以下为成功后的相关操作
echo "Enroll Success!";
}
else
{
echo "Error!";
exit ;
}
菜鸟一只,求大神帮帮忙…… 展开
trim($password);
$_post["name"];
$_post["password"];
if(!$name || !$password )
{
echo "Your have not enter your detail message";
exit;
}
////数据库的连接
$db = mysql_pconnect($Host, $DbaUser,$DbaPassword);
if(!$db)
{
echo "Error: Could not connect to database.Please try again.";
exit;
}
//选择数据库
mysql_select_db($Database,$db);
//插入
$query = "INSERT INTO user VALUES ('','$name','$password');"
//结果
$result = mysql_query($query);
if($result)
{
///以下为成功后的相关操作
echo "Enroll Success!";
}
else
{
echo "Error!";
exit ;
}
菜鸟一只,求大神帮帮忙…… 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询