我收到此消息
解析错误:语法错误,出现意外的$ username(T_VARIABLE) 第9行的C:\ wamp64 \ www \ tutorial \ register_parse.php
尝试自己注册论坛时。我可以找出我做错了什么。 这是代码:
<?php
include("connect.php");
$username = $_POST["username"];
$password = $_POST["password"];
$sql = "INSERT INTO forum.users(username,password)
VALUES("$username","$password"); ";
$res = mysql_query($sql);
if($res){
echo "Successfully registered as: ".$username;
}
else{
echo "failed to register, please try again </br>";
echo "ERROR: ".mysql_error();
}
?>