I'm submitting form using jQuery serialize() function and I'm getting this on PHP page:
[data] => title=Demo&days=2;
But when I'm using echo or to save $_POST['days']
value into variable I'm getting Undefined index: days
How to resolve it?
I'm submitting form using jQuery serialize() function and I'm getting this on PHP page:
[data] => title=Demo&days=2;
But when I'm using echo or to save $_POST['days']
value into variable I'm getting Undefined index: days
How to resolve it?
If data is the posted variable then you have to parse the string in your PHP script. If it's a GET request and that's the url you need to use $_GET instead.