I am very newbie in PHP, i am passing query string to a ajax call using the below code. i want to get these on another php page. but not getting how i can get these:
$("#saveForm").click(function(e){
var test =$("#Field4").val();
alert(test);
$.ajax({
url: 'mytest.php?firstname=ram&lastname=Singh',
async: false,
success: function (response) {
alert(response);
}
});
});
i have tried the code as below to get query string, but it is giving me all query strings in one string
$name = $_SERVER["QUERY_STRING"];
echo($name);
i have some expewrince in ASP.NET. and in ASP.net we can get the value of query string with it's key like, if we want to get firstname from the query string we use as below:
string fName= Request.QueryString["furstname"];
can we do the same in PHP, if it is possible then, how? i have checked on google alot but not found any helpful link. Please help me