So i am trying to have 2 seperate if statements in my index.php file but for some reason the if statements are not working. Basically I am using jquery to send values using $.get to the php function
index.php:
if (isset($_GET['year']) && isset($_GET['month']) && isset($_GET['monthStr']))
{
}
if (isset($_GET['yearPaid']) && isset($_GET['monthPaid']) && isset($_GET['personName_id']))
{
}
Here is the relevant js (the second if statement does not work):
$.get("index.php", { 'personName_id':user_id, 'monthPaid':month, 'yearPaid':year})
.done(function(data) {
console.log($(data).html());
entry.animate({
opacity: 0.2,
}, 1000 );
});
any ideas guys?
EDIT: when i mean 'not working', the second if statement is not firing the first one working fine.
EDIT: WOW! I FEEL SO STUPID! turns out the 2nd if was nested inside the first. Sorry for the waste of time guys I really appreciate your help though
EDIT: still same problem :P
EDIT: Some how it magically fixed turns ut my ajax request from jquery was messed up