[wd_asp elements=’search’ ratio=’100%’ id=1]

Get last visited page- Referal – Pagename as variable

28th November 2013

Php - Miscellaneous

php codehaven

http://localhost:8080/myfolder/hostname.php

To send url of page hidden to collect in next page use this code below: –
localhost:8080/myfolder/hostname.php


Remember to collect on the other side

http://localhost:8080

$url="http://".$_SERVER['HTTP_HOST'];

and for just the actual pagename
index2.php$justpagename = basename($_SERVER['SCRIPT_NAME']);

and for the previous pages page name only
clickme.phpecho $url=basename($_SERVER['HTTP_REFERER']);