<?php
echo " welcome ";
$conn=mysql_connect("mysql7.000webhost.com","a8678936_kishlay","nikhilnn2");
$db= mysql_select_db("a8678936_aman",$conn);
$function_name=$_GET['jsonp'];
$a=$_GET['user'];
$pwd=$_GET['pass'];
$query="select * from member where user='$a' and pass='$pwd'";
$result=mysql_query($query);
$num=mysql_num_rows($result);
//create json array
$JSON_array=array();
if($num>0)
{
$json_array['status']="true";
}
else
{
$json_array['status']="false";
}
//echo the json array
echo "$fuction_name{";
print json_encode($json_array);
echo "}";
?>
No comments:
Post a Comment