I Have A Problem With Ajax

i am using ajax through jquery but it is not working here is my code can any one tell where is the problem

from view.php i am sending it as


function main()


	navigator.geolocation.getCurrentPosition(successHandler, errorHandler);	

	function successHandler(location) {

		var message = document.getElementById("message"), html = [];

		var longitude = location.coords.longitude;

		var latitude = location.coords.latitude;

		var accuracy = location.coords.accuracy;

		var temp="/project/index.php?r=merchant/userloc&id="+<?php echo $model->id ?>;



			type: "GET",

			url: temp,

			data: {


				longi: longitude,

				acc: accuracy,


			success: function(data)







	function errorHandler(error) {

		alert('Attempt to get location failed: ' + error.message);





from userloc.php i am getting it as


	if(isset($_GET['lat']) && isset($_GET['longi']) && isset($_GET['acc']))

		die("data received");


		die("nothing received");


it always die "nothing received"

whats wrong with this code

Use console.log(location.coords) to ensure that all the coords were received from browser.

Then log $_GET array to see what was actually sent.