I am trying to just set a session variable on one page, then load it on another page. This code works on Firefox on Windows 7. It does not work when accessing the same pages on my iPod Touch.
The first page is like this:
session_start();
$id = "e0vgrejdmkjbltrdrtqtnjgzmy1cqurfluuzodeyqjlcoey5rx0";
$_SESSION['id'] = $id;
The second page contains this code:
session_start();
$id = $_SESSION['id'];
echo "ID is $id";
The output then shows as:
ID is
If I run this code:
echo "Cookie ";
print_r($_COOKIE);
echo "Session ";
print_r($_SESSION);
The output on my Windows machine is:
Cookies Array ( [__utma] => 118825363.834893446.1282611798.1283521628.1283525684.13 [__utmz] => 118825363.1283397018.9.7.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=spf test [PHPSESSID] => 6333ddae9f0514f7c4744e340a6746d1 [__utmc] => 118825363 [__utmb] => 118825363.5.10.1283525684 [id] => eza3odazrtcxlty5mdutoem2ms05ndqxltrcnzvgrjjbnzrgqn0 ) Session Array ( [id] => ezffmddgmdmxluvcmzmtruvfnc0wmdu4ltrfnzddnevfmdhfnx0 )
and the output on my iPhone is:
Cookies Array ( [PHPSESSID] => 8ec43ead5611dde399d763166926021d [__utma] => 118825363.1927811493.1283218120.1283521676.1283525856.6 [__utmb] => 118825363.1.10.1283525856 [__utmc] => 118825363 [__utmz] => 118825363.1283490501.4.3.utmcsr=(mydomain.com)|utmccn=(referral)|utmcmd=referral|utmcct=/ ) Session Array ( [id] => )
No error happens, it just appears to set $id to be "" I think. This seems simple enough. Is there something I am missing where you cannot do this on an Apple device?