Broken Session variables on iPhone/iPod Touch using PHP

terrencemouse

New Member
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:\[code\]session_start(); $id = "e0vgrejdmkjbltrdrtqtnjgzmy1cqurfluuzodeyqjlcoey5rx0";$_SESSION['id'] = $id;\[/code\]The second page contains this code:\[code\]session_start();$id = $_SESSION['id'];echo "ID is $id";\[/code\]The output then shows as:\[code\]ID is \[/code\]If I run this code:\[code\]echo "Cookie ";print_r($_COOKIE);echo "Session ";print_r($_SESSION);\[/code\]The output on my Windows machine is:\[code\]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 ) \[/code\]and the output on my iPhone is:\[code\]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] => )\[/code\]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?
 
Back
Top