I want to pass a variable from file1.php to file2.php using jquery.
file1.php
<?php
$user_rank = $rank;
?>
file2.php
<?php
$user_rank = $_GET['user_rank'];
?>
AJAX
function getRank()
{
$.ajax({
type: "GET",
url: "file2.php",
data: ?????,
success: function(result){
$("#TargetRank").html(result);
}
});
};
Can anyone help me with this?