A bit frustrated.
Trying to use cookies to recuperate an user's id whenever he returns to the web page so as to retrieve his data from a mysql table.
Got it figured out and working in my local server (wamp). But when uploading the programs to my web server it gives different results.
The code is as follows:
If(isset($COOKIE["volid"]))
{
$cookids = $COOKIE[volid];
print ("cookids is: ".$cookids."<br>");
//get the id without the single quotes:
$cookids = substr($cookids,1,2);
print ("cookids is: ".$cookids."<br>");
etc etc
This code displays the following on screen:
1) In my local server:
cookids is: '30'
cookids is: 30
2) But on my remote server:
cookids is: \'35\'
cookids is: '3
So it's quite a bummer to not get the same results, and probable have to adapt the php program difefrent for the remote server. Could this have something to do with the different php.ini settings on each server or different versions of php ?
Thanks in advance😕