<?php session_start();
if($_SESSION){
?>

<?php
		$conn = new mysqli("localhost","root","","event");
	$fname = ($_POST['fname']);
	$lname = ($_POST['lname']);
	$email = ($_POST['email']);
	$address = ($_POST['address']);
	$phone = ($_POST['phone']);
	$gender = ($_POST['gender']);
	$city = ($_POST['city']);
	$country = ($_POST['country']);
	$username = ($_POST['username']);
	$password = ($_POST['password']);
	function test_input($data) {
  $data = trim($data);
  $data = stripslashes($data);
  $data = htmlspecialchars($data);
  $data = mysql_real_escape_string($data);
  return $data;
}

$update="update signup set (fname=['".$fname."'],lname=['".$lname."'],email=['".$email."'],address=['".$address."'],phone=['".$phone."'],gender=['".$gender."'],city=['".$city."'],country=['".$country."'],username=['".$username."'],password=['".$password."'])"; 
	
	



	if(isset($_REQUEST['submit'])){
		if(($_REQUEST['fname'] != "") && ($_REQUEST['lname'] != "") && ($_REQUEST['email'] != "") && ($_REQUEST['address'] != "") && ($_REQUEST['phone'] != "") && ($_REQUEST['gender'] != "") && ($_REQUEST['city'] != "") && ($_REQUEST['country'] != "") && ($_REQUEST['username'] != "") && ($_REQUEST['password'] != "")){
			session_start();
			$_SESSION['Session_Form_Data'] = $_REQUEST;
			header("Location: Customer_details2.php");
		}
		else{
			echo "Please fill all the details.";
		}
	}
	else{
		echo "Kindly click on submit button to process the form";
	}

?>
<?php
  }
  else{
    echo "<script>
   alert('You have to  login first...!');
   window.location.href='event2.php';
   </script>";
  }
  
?>