PHP in Ajax Call Fails

JavaScript related questions should go here.
Post Reply
unemployment
Posts: 165
Joined: Fri May 06, 2011 5:02 pm

PHP in Ajax Call Fails

Post by unemployment »

I am using this ajax call

http://mysite.com/assets/ajax/goal_crea ... 7&status=0

but my php seems to be failing. It says I don't have status defined, but my URL says I do, right?

AJAX PHP Code
if (isset($_GET['gid']) !== false && isset($_GET['status']) !== false && isset($user_info['uid']) !== false)
{
	$gid	= (int)$gid;
	$status = (int)$status;    // If I remove this then status updated will echo
	
	echo 'status updated';
}
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: PHP in Ajax Call Fails

Post by jacek »

Where do you initially defined $status ?
Image
Post Reply