include "logincheck.php"; ?> ob_start(); //$major1=""; //include "../logincheck.php"; include "connect.php"; $errmsg=""; $status=""; $emailStatus=""; $usernameStatus=""; $validatedOk="True"; if(isset($_POST['submit'])) { $title=$_REQUEST['title']; $firstname=$_REQUEST['firstname']; $lastname=$_REQUEST['lastname']; $jobtitle=$_REQUEST['jobtitle']; $preface=$_REQUEST['preface']; $address=$_REQUEST['address']; $city=$_REQUEST['city']; $state=$_REQUEST['state']; $zipcode=$_REQUEST['zipcode']; $country=$_REQUEST['country']; $email=$_REQUEST['email']; $phonenumber=$_REQUEST['phonenumber']; $username=$_REQUEST['username']; $password=$_REQUEST['password']; $cpassword=$_REQUEST['cpassword']; $date=date("Y-m-d G:i:s"); $esql=mysql_query("select email from newuser where email ='$email'"); if(!mysql_num_rows($esql)) { $emailStatus="success"; } else { $validatedOk=False; $emailStatus = "Sorry! This email-id already exists.Please try another"; } $usql=mysql_query("select username from newuser where username ='$username'"); if(!mysql_num_rows($usql)) { $usernameStatus="success"; } else { $usernameStatus = "Sorry! This Username already exists.Please try another"; $validatedOk=False; } // if(($emailStatus == "success") and ($usernameStatus="success")) if ($validatedOk==True) { $sqlindetail=mysql_query("insert into newuser(title,firstname,lastname,jobtitle,preface,address,city,state,zipcode, country,email,phonenumber,username,password,cpassword ) values ('$title','$firstname','$lastname','$jobtitle','$preface','$address','$city','$state','$zipcode','$country','$email','$phonenumber','$username','$password','$cpassword')"); //echo $sqlindetail; echo mysql_error(); $status="success"; } else { $errmsg="Either the Username or Emailid already exists. Please Try another"; } if($status == "success") { header('Location:final.php'); ob_end_flush(); exit; } } ?>
![]() |
|||||||||