I've tried running a query but it says that I have an error in my SQL syntax. Why?
This should be the only code you need:
$sql = "INSERT (email, username, password) VALUES ($email, $username, $password)";
I am also aware of SQL injection. I will add a patch which is mysqli_real_eacape_string()
function.