rich_hemmo Posted April 10, 2014 Share Posted April 10, 2014 Hi Guys I'm in the middle of creating my own website and I'm having trouble with letting users to register I have created the code but when I click on the "submit" button I'm getting a blank white screen config.php <?php //Mysql Connect | mysql_connect("host= 3306","username",""); //Below example to connect in localhost $a=mysql_connect("localhost","root",""); //select your database $b=mysql_select_db("database_name",$a); ?> and this is the submit_form.php ?php $firstname=$_POST['firstname']; $lastname=$_POST['lastname']; $username=$_POST['username']; //$confirmusername=$_POST['confirmusername']; $password=$_POST['password']; $confirmpassword=$_POST['confirmpassword']; $email=$_POST['email']; $confirmemail=$_POST['confirmemail']; //Database connection require_once("config.php"); //mysql query to insert value to database $query=mysql_query("INSERT INTO registration (`firstname`, `lastname`, `username`, `confirmusername`, `password`, `confirmpassword`, `email` ,`confirmemail`) VALUES ('$firstname', '$lastname', '$username', '$password', '$confirmpassword', '$email' , '$confirmemail')"); //if value inserted successyully disply success message if($query) { echo 'Registred successfully..!!</div>'; }else { //error message echo '<unable to registred !!</div>'; } ?> Hope someone can help me and give me some pointers please Richsubmit-form.phpconfig.phpregister.php Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted April 10, 2014 Share Posted April 10, 2014 Have you tried enabling errors? http://www.php.net/manual/en/function.error-reporting.php http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors Quote Link to comment Share on other sites More sharing options...
rich_hemmo Posted April 10, 2014 Author Share Posted April 10, 2014 hi cyberRobot I will have a look but its been a while since i have done error checking with php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.