Is it possible to send a value to php file whilst performing a jquery GET request -


i making request in jquery php file , need send variable php use in query. possible? want grab emailaddress variable in php.

 function getdata(){      var emailaddress = "myemail@gmail.com";      $.getjson('myfile.php', function(data){                  $.each(data, function(key, val) {     $("#userage").val(val.age);                                                });             });  } 

so in php want able select have email address have passed in.

i have use jquery , php developing hybrid app in phonegap cant use php directly.

thanks.

the optional second argument used passing parameters:

$.getjson('myfile.php', { email: emailaddress }, function(data) {     $.each(data, function(key, val) {         $("#userage").val(val.age);     }) }); 

in php script use $_get['email'] email address.


Popular posts from this blog