I am new to Jquery, Hence i am posting this question, may be its simple .
I have written the query in php page and i want to retrive it it jquery page .The php page is as follows.
$chkuser = "SELECT A.* FROM mcd_users A WHERE A.User_Handle=('{$User_Handle}')
AND A.User_Password=('{$User_Password}') AND A.Rec_Status='A' AND
A.User_Status='A'";
try {
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare($chkuser);
//$stmt->bindParam("id", $_GET[id]);
$stmt->execute();
$login = $stmt->fetchObject();
$dbh = null;
echo '{"item":'. json_encode($login) .'}';
JQuery Code :-
$.ajax({
url: 'ajax_files/login.php',
crossDomain: true,
type: 'post',
data: $("#loginForm").serialize(),
success: function(data){
if(data!== null)
{alert(data);
//var res=$json.decode(data);
//alert(res);
}
}
}); // Ajax Call
Now when i alert(data); it shows.
{"item":
{"User_Id":"1110","Rec_Status":"A","Rec_Seq":"3","UserApplication_Id":"101",
"User_Type":"U","
User_Handle":"MCD_Admin","User_Password":"827ccb0eea8a706c4c34a16891f84e7b",
"PasswordChanged_Date":"2014-08-04",
"User_Status":"A","User_Email":"gasian@muj.com","User_Phone":"8877665544",
"Locked":"N","Reset":"N","Customer_Id":"10","CreatedBy":"1110",
"CreatedOn":"2013-07-30 00:00:00","ModifiedBy":"1110","ModifiedTime":"2014-08-04 10:49:20"}} **
Now i need to display only the User_Handle which is MCD_Admin in jquery.js page.How to retrieve it.Any help appreciated.