Data from WebForm not being entered into Database (MySQL) PHP -


i have built website have built registration form. have managed connection no errors, data isn't being entered form database. code have php 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 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 on matter appreciated! can't seem work out issue myself having checked numerous times!

$dbhost="refereelink.mysql"; 

what that? use localhost or address of mysql server

you should wary of sql injection , fact mysql_* depreciated


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -