or die("Connection failed");
if(isset($_POST['registerbtn'])){
$username=$_POST['username'];
$email=$_POST['email'];
$password=$_POST['password'];
$cpassword=$_POST['confirmpassword'];
if($password===$cpassword){
$insert="INSERT INTO admin_panel (username, email, password) VALUES('$username', '$email', '$password')";
$run= mysqli_query($con, $insert);
if($run){
echo "<script>alert('Saved')</script>";
}
else{
echo "<script>alert('Not Saved')</script>";
}
}
}
else{
echo "<script>alert('Not Saved')</script>";
}
?>
This is the script to data into my database
Обсуждают сегодня