Hi,
I wonder if someone could help me please.
I basically made a registration form and need to insert the data into the database.
I am not sure how i use the MySQL functions to do this,
I created a db connection file and included it on registration page but not sure if i first havew to query database then insert data etc, i am a little confused.
Before any data can be inserted it has to check if the email address and username already exist. Could someone plese give me the info on what order i do it?
here is what needs being added to database.
username, first_name, last_name, email, password
before it inserts the users data it needs to check to make sure the username and email does or does nto exist.
If someone could help me with this it would be much appreciated.
Here is my db connection file code in case it helps, this is included using the php include in the registration page. All i need help in how i got about checkning if username and email exists or not and if all ok put info in db or give an error to say it already exists.
<?php
// Database Connection Details
$host = "localhost"; // Usually Local Host
$user = "none"; // Database Username
$pass = "none"; // Database Password
$database = "usernone"; // Database Name
mysql_connect ($host, $user, $pass, $database);
?>
Thank you,
genieuk