Hi how can I execute first my jQuery scripts before my php code.
Here is my (javascript/jQuert) code:
function success_callback(p)
{
jQuery.post("http://geolocation.php", { latlong: LatLong, country: CountryName, city: LocaLityName},
function(data){
jQuery("#debug").text(data);
jQuery("div").show();
});
}
Geolocation.php bulunan PHP SINIFI:
$data = array();
$data['id'] = 267722;
$data['latlong'] = $_POST['latlong'];
$data['country'] = $_POST['country'];
$data['city'] = $_POST['city'];
print_r($data);
GetLatLong::GetLocation($_SESSION['cId'],$_POST['latlong'], $_POST['country'], $_POST['city']);
if($flag == true){
new Statistics($data, $db, $type);
}
new Statistics($data, $db, $type);
kodu her zaman hatta ben bir bayrak koymak yürütmek edilir.