I have the following script submitted once with a form.
Once submitted the form places a cookies and when the visitor returns he is redirected directly on the checkout page.
Right now I had to change it a bit how it works and use a dinamic link to monitor all the visitors.
Until then the link never changed and the cookie worked.
This is the old script
$fp = fopen("email".$email2.".txt", 'w');
fwrite($fp, $con);
fclose($fp);
setcookie('email/',$email2,time()+3600*24*5);
This is the new one I tried:
$fp = fopen("../old/email/".$email2.".txt", 'w');
fwrite($fp, $con);
fclose($fp);
setcookie('email',$email2,time()+3600*24*5);
Basically
I want it to place the cookie in a folder from another directory and I can`t make it to work.
Once submitted the form places a cookies and when the visitor returns he is redirected directly on the checkout page.
Right now I had to change it a bit how it works and use a dinamic link to monitor all the visitors.
Until then the link never changed and the cookie worked.
This is the old script
$fp = fopen("email".$email2.".txt", 'w');
fwrite($fp, $con);
fclose($fp);
setcookie('email/',$email2,time()+3600*24*5);
This is the new one I tried:
$fp = fopen("../old/email/".$email2.".txt", 'w');
fwrite($fp, $con);
fclose($fp);
setcookie('email',$email2,time()+3600*24*5);
Basically
I want it to place the cookie in a folder from another directory and I can`t make it to work.