Connecting to a database and inserting form field data?

Hello

Is there a template out there which shows how to connect to a database, open it, insert a user’s username, password, and email details - I have in mind a ‘register new user’ form on a Web site - and close the connection to that database.

I ask because according to the mySQL Web site, you need to use CREATE USER to insert new users in a database yet I am sure I have seen PhP scripts in the past which don’t use CREATE USER, so it’s a bit confusing!

Thanks for any help.

Not the best approach but,

http://www.w3schools.com/php/php_mysql_insert.asp

Many thanks for that astonecipher, it looks useful!

Sponsor our Newsletter | Privacy Policy | Terms of Service