Don't use raw
$_POST
in you queries! Never!Use prepared statements to insert user data.
Always check for query result and read from
mysqli_error()
to check what is wrong.
In this case you're not putting $_POST[name]
in '
so it'll lead to syntax error. Also in first query you are using '
instead of ` to wrap column names.