I have built a website have built a registration form. I have managed to get a connection with no errors, however the data isn't being entered from the form into the database. The code I have for the PHP is below...
$dbhost="refereelink.mysql";
$dbuser=" ";
$dbpass=" ";
$dbname="refereelink_com";
$conn = mysql_connect($dbhost, $dbuser, $dbpass)
or die (mysql_error());
mysql_select_db($dbname);
if (isset($_POST['add'])){
$firstname = $_POST['firstname'];
$surname = $_POST['surname'];
$dob = $_POST['dob'];
$city = $_POST['city'];
$r_country = $_POST['r_country'];
$r_region = $_POST['r_region'];
$r_level = $_POST['r_level'];
$r_email = $_POST['r_email'];
$r_contact_n = $_POST['r_contact_n'];
$r_username = $_POST ['r_username'];
$r_password =$_POST['r_password'];
$membership_type =$_POST ['membership_type'];
$insert=
"INSERT INTO referees (firstname, surname, dob, city, r_country, r_region, r_level, r_email, r_contact_n, r_username, r_password)
VALUES ('$firstname', '$surname', '$dob', '$city', '$r_county', '$r_region', '$r_level', '$r_email', '$r_contact_n', '$r_username', '$r_password')";
mysql_query($insert) or die(mysql_error());
}
Any help on this matter would be appreciated! I can't seem to work out what the issue is myself having checked it numerous times!