Skip to content

Instantly share code, notes, and snippets.

@sakshiagg1993
Created April 3, 2016 12:47
Show Gist options
  • Select an option

  • Save sakshiagg1993/0261aff91f280a0b3c94104eaebde614 to your computer and use it in GitHub Desktop.

Select an option

Save sakshiagg1993/0261aff91f280a0b3c94104eaebde614 to your computer and use it in GitHub Desktop.
<?php
require 'init.php';
$email=$_GET["email"];
$phone_number=$_GET["phone_number"];
$mysql_qry="INSERT INTO 'user_info'('email','phone_number') VALUES('$email', '$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);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment