Forum Moderators: coopster
$image_clicked = $_SERVER['HTTP_REFERER'];
If it's not unique, you could make it unique with an anchor (#) on each URL, like:-
http://www.example.com/link.html#1
http://www.example.com/link.html#2
http://www.example.com/link.html#3
Then split that inside the callee script:-
$image_clicked = $_SERVER['HTTP_REFERER'];
$image_id = explode("#", $image_clicked);
As mentioned above, if you wrap the callee script into an AJAX request, you can obtain that data without the page reloading. You could store that server-side, or perhaps, given it's only 2 vars you need, store it client-side using cookies.
Sounds like an interesting user-interface being developed ;)
So if the home url is [localhost...] then the two image links are [localhost...] and
[localhost...]
but using HTTP_REFERER, I am not able to store these two values (#1 and #2) when i click on them because they are on the same page. Is there any way to do this without linking them(the two image maps) to a different page?
Thankyou.