Currently on my webpage, im showing my users their cookieid, which has two parts associated to it, known as their partyid and userid,
the way it is set
localhost/setcookie.php?ptyid=1&uid=628929
result
1%3A628929
the way it is shown
echo 'Cookie Set =>
PartyID : ' .substr($_COOKIE["cookieid"],-8,1). ', UserID : ' .substr($_COOKIE["cookieid"],2);
this was going fine till my setcookie.php only allowed the users to set partyID as 1 and userID had to have exactly 6 characters in it. but now i have to allow them to use any partyid and any amount of characters to the userID.
Therefore is there anyway I could use a substring(or any other method) dynamically to serve any partyid or userid. i think of something which could detect the %3A and split the string but I fail to find a way for that.