0byt3m1n1
Path:
C:
/
wamp64
/
www
/
WaterCat
/
[
Home
]
File: insert.php
<?php $servername="localhost"; $username="root"; $password=""; $dbname="watercat"; $conn=new mysqli($servername,$username,$password,$dbname); if(isset($_GET['submit'])) { if(!empty($_GET['name']) && !empty($_GET['email']) && !empty($_GET['address']) && !empty($_GET['password'])&& !empty($_GET['confirmpassword'])) { $name=$_GET['name']; $email=$_GET['email']; $address=$_GET['address']; $password=$_GET['password']; $confirmpassword=$_GET['confirmpassword']; $query="insert into register(Name,Address,Email,Password,Confirm) values('$name','$address','$email','$password','$confirmpassword')"; $query1="select * from register where Email='$email'"; $result=mysqli_query($conn,$query1); $rows=mysqli_fetch_assoc($result); $id=$rows['Id']; $em=$rows['Email']; if($password==$confirmpassword){ $run=mysqli_query($conn,$query) or die(mysqli_error($conn)); if($run){ echo ("<script language='javascript'> window.alert('Details Updated SUCCESSFULLY!!!'); window.location.href='log2.php?id=$id'; </script>"); } } else{ echo " form is not submitted Please check Your Password "; } } $query="select * from register where email='$email'"; $result=mysqli_query($conn,$query); $rows=mysqli_fetch_assoc($result); $id=$rows['Id']; } ?> <br> <br> <a href="login.php?id=<?php echo $id?>">LOGIN</a> <html> <head> <title>welcome page</title> </head> <body background="assets/images/bkg.jpg"> </body> <html>