<?php
$con = mysqli_connect("hostename", "username", "password", "id");
$name = $_POST["name"];
$email = $_POST["Password"];
$Password = $_POST["email"];
$contect = $_POST["contect"];
$sql_login = "SELECT * FROM Users WHERE email = 'email'";
$result_login = mysqli_query($con, $sql_login);
if ($result_login->num_rows > 0) {
echo "Email already exists!";
}else{
$sql = "INSERT INTO Users(name,Password,email,contect) VALUES ('$name','$Password,'$email','$contect')";
$result = mysqli_query( $con , $sql );
if($result){
echo "Registerd successfully";
}else{
echo "Registerd Failed";
}
}
?>
Comments
Post a Comment