When I try to insert a new row it gives me this error:
Parse error: syntax error, unexpected ';'
When I execute the query, what I am doing wrong?
// Selecting Database
$db = mysql_select_db("spinbb_weedworld", $connection) or die(mysql_error($db));
// SQL query to fetch information of registerd users and finds user match.
$query = "INSERT INTO login ('name','password', 'email','username')
VALUES ('".$name."', '".$password."', '".$email."','".$username."')";
$query = mysql_query($query,$db) or die(mysql_error($db);
if ($query)
{
header("location: profile.php");
}
else
{
echo("MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$query\n<br>");
}
mysql_close($connection); // Closing Connection