Forum Moderators: coopster
I'm trying to do this for some days now but still not getting somewhere.
I want to set a cookie that change the visitor's file extension upon click on a link, ex.
Link1: index.1.php
Link2: index.2.php
Link3: index.3.php
...
Now lets say that you are click on Link1 and the cookie is placed, and then click on a second link, lets say default.php; now i want the default file get the extension .1.php rather than .php, and so on. When a cookie is set all the following files get the specified extension.
Can anybody help?
Thanks.
I want to create a php file to change the file extension, maybe something like:
$file = "index";
$path = $_SERVER['DOCUMENT_ROOT']."/$file.1.php";
include($path);
Now (the cookie part) i want to set a cookie that call the code above if the visitor click on a link, and every time the visitor click on a different link (ex. from Link1 to Link2) this cookie updated with the right file extension.
Thanks a lot :)