I am getting this message
Parse error: syntax error, unexpected '$username' (T_VARIABLE) in C:\wamp64\www\tutorial\register_parse.php on line 9
when trying my own register for forum. I can figure out what ive done wrong. here is the code:
<?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();
}
?>