<?php 

    
if(isset($_POST['submit']))
{
  $email=$_POST['email'];
  $password=$_POST['password'];
  $conpassword=$_POST['conpassword'];

if(($email != "") && ($password != "") && ($conpassword != ""))
{
   $conn = new mysqli("localhost","root","","event");
  if($password == $conpassword){
    $joinpass = $conpassword;
  
  $select="select email from signup where email=$email";

  $confirmation=mysqli_query($conn,$select);
  
 
    $update="update signup set password='".$joinpass."' where email='".$email."'";
    $confirmation1=mysqli_query($conn,$update);
        

       header("Location:event2.php");
       
        
        //echo "UPDATED SUCCESSFULLY";

  }
  //else{
  
   //echo "<script>window.top.location='forgot_password.php';{alert('Your Email is Not Match Please Try Again.');};</script>";
//}
  


else{
  header("Location:forgot_password.php");
   //echo "<script>window.top.location='forgot_password.php';{alert('Your massage is Sent.');};</script>";
}
}
}
?>