Hello all. Newbie here. I have a question regarding cookies.
I have set two cookies in script #1, namely EditingTraining and EditSPMarketing, but only seem to be able to read one of them in script #2.
Excerpts from the script are below. I'm hoping the problem has something to do with the way that I've coded the scripts, but am really quite perplexed as to why this isn't working.
Script #1
setcookie("EditTraining", $row['EditTraining'], time()+5184000, '/');
setcookie("EditSPMarketing", $row['EditSPMarketing'], time()+5184000, '/');
Script #2
$EditTraining = $_COOKIE['EditTraining'];
$EditSPMarketing = $_COOKIE['EditSPMarketing'];
echo "EditSPMarketing: $EditSPMarketing<br>";
echo "EditTraining: $EditTraining<br>";
Output
EditSPMarketing:
EditTraining: 1
As you can see from the output, EditTraining displays '1' while EditSPMarketing seems to contain a null value. I have used echo to display the value of both columns before I set the cookie and EditSPMarketing definitely displays a value, but only one seems to get written to a cookie.
What am I doing wrong here?
Thank you,
BillyB