unemployment Posted June 1, 2011 Share Posted June 1, 2011 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'; } Link to comment https://forums.phpfreaks.com/topic/238095-php-in-ajax-call-fails/ Share on other sites More sharing options...
fugix Posted June 1, 2011 Share Posted June 1, 2011 where do you assign your $_GET values to variables? Link to comment https://forums.phpfreaks.com/topic/238095-php-in-ajax-call-fails/#findComment-1223487 Share on other sites More sharing options...
unemployment Posted June 1, 2011 Author Share Posted June 1, 2011 where do you assign your $_GET values to variables? Aren't they assigned here? ajax.get('/assets/ajax/goal_create.php?gid=' + divId + '&status=' + 0, function (resp) { // var goal_status = eval('(' + resp + ')'); // console.log(goal_status); }); Link to comment https://forums.phpfreaks.com/topic/238095-php-in-ajax-call-fails/#findComment-1223495 Share on other sites More sharing options...
fugix Posted June 1, 2011 Share Posted June 1, 2011 sorry for being unclear..i'm talking about $gid and $status Link to comment https://forums.phpfreaks.com/topic/238095-php-in-ajax-call-fails/#findComment-1223508 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.