Skip to content

Instantly share code, notes, and snippets.

@sakshiagg1993
Created March 30, 2016 07:27
Show Gist options
  • Save sakshiagg1993/3f23685eb117b5aafbf8f032b553d903 to your computer and use it in GitHub Desktop.
Save sakshiagg1993/3f23685eb117b5aafbf8f032b553d903 to your computer and use it in GitHub Desktop.
<?php
require"init.php";
$email=$_POST["email"];
$phone_number=$_POST["phone_number"];
$mysql_qry="select* from user_info where email like'$email' and phone_number like '$phone_number';
$result= mysqli_query($init, $mysql_qry);
if(mysqli_num_rows($result) > 0 ){
$response["message"]="submitted sucessfully";
echo json_encode($response);
}
else{
$response["message"]="enter the details again";
echo json_encode($response);
}
?>
@goelvibhor4
Copy link

This is correct code

0 ){ $response["message"]="submitted sucessfully"; echo json_encode($response); } else{ $response["message"]="enter the details again"; echo json_encode($response); } ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment