include "common.php";
$con = mysql_connect($host,$user,$password) or die("Connection Failure to Database");
$ErrrorMessage="";
$loginid = $_POST['userid'];
$password = $_POST['password'];
$fname = $_POST['first_name'];
$lname = $_POST['last_name'];
$email = $_POST['email'];
$phoneno = $_POST['phoneNo'];
$occupation = $_POST['occupation'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$pincode = $_POST['pin'];
$country = $_POST['country'];
if($loginid != null || $loginid != ""){
mysql_select_db($database, $con) or die("Database not selected!");
$result = mysql_query("Select * from registration where userid='".$loginid."'", $con);
$numofrows = mysql_num_rows($result);
if ($numofrows != 0) {
$ErrrorMessage= "User Already Exists!";
}
else{
$result1 = mysql_db_query($database,"Select max(id)as max from registration");
$row1 = mysql_fetch_array($result1);
$tempid = $row1["max"];
$tempid = $tempid + 1;
$sql = "insert into registration values(";
$sql=$sql.$tempid.",'";
$sql=$sql.$loginid."','";
$sql=$sql.$password."','";
$sql=$sql.$fname."','";
$sql=$sql.$lname."','";
$sql=$sql.$email."','";
$sql=$sql.$phoneno."','";
$sql=$sql.$occupation."','";
$sql=$sql.$address."','";
$sql=$sql.$city."','";
$sql=$sql.$state."','";
$sql=$sql.$pincode."','";
$sql=$sql.$country."')";
mysql_db_query($database,$sql) or die("Failed Query of " . $sql);
header("Location: register-success.php");
//echo "Registeration Successfully Completed.";
exit;
}
}
?>
Java Jazz Up-Registration
include "top_register.shtml";
?>
include "left.shtml";
?>
|
include "right.shtml";
?>
|
include "bottom.shtml";
?>
|