Quote:
i am not sure why my echoing is not working
that is because it has been redirected to register.php due to
header("Location: register.php");
If you really want to see the echo messages, then comment it out temporarily:
Quote:
and also the data is not being inserted into the database
Barring another other errors, one obvious mistake is that you are using a
reserved word for mysql[
^], i.e. user as table name. Most of the reserved words are forbidden by standard SQL as column or table name. To get around it, surround it with a pair of back ticks, i.e.
`user`
Last but not least, you should adopt
PHP Prepared Statements[
^] to minimize the risk of SQL injection.