|
Posted by windandwaves on 11/24/05 11:28
Hi There
Can some Flash guru tell me if this Flash code is OK to set / retrieve a
cookie for exchange with PHP?
stop();
var ses:string;
//create the local Shared Object
myLocalSO = sharedobject.getLocal("hookie" );
if(_root.destroy) {
myLocalSO.data.name = "destroyed";
}
else {
//if cookie already exists then get ses from cookie
if (myLocalSO.data.name.length == 32) {
ses = myLocalSO.data.name;
getURL("index.php", "_self", "GET");
}
//if cookie does not exist then make it
else {
myLocalSO.data.name = _root.PHPSESSID;
}
ses = myLocalSO.data.name;
getURL("voter.php", "_self", "POST");
}
Navigation:
[Reply to this message]
|