How to link back to previous page using $_SERVER[‘HTTP_REFERER’] ?

143

How to link back to previous page  using $_SERVER given below .


print_r($_SERVER); exit();

You will get List of Keys and Values in Array. Here I’m showing only Keys and Remove Values.


[REDIRECT_UNIQUE_ID]
[REDIRECT_REMOTE_AUTHORIZATION]
[REDIRECT_STATUS]
[UNIQUE_ID]
[REMOTE_AUTHORIZATION]
[HTTP_CACHE_CONTROL]
[HTTP_UPGRADE_INSECURE_REQUESTS]
[HTTP_USER_AGENT]
[HTTP_ACCEPT]
[HTTP_REFERER]
[HTTP_ACCEPT_LANGUAGE]
[HTTP_X_DEVICE]
[HTTP_X_FORWARDED_FOR]
[HTTP_HOST]
[HTTP_ACCEPT_ENCODING]
[HTTP_COOKIE]
[HTTP_X_VARNISH]
[PATH]
[SERVER_SIGNATURE]
[SERVER_SOFTWARE]
[SERVER_NAME]
[SERVER_ADDR]
[SERVER_PORT]
[REMOTE_ADDR]
[DOCUMENT_ROOT]
[REQUEST_SCHEME]
[CONTEXT_PREFIX]
[CONTEXT_DOCUMENT_ROOT]
[SERVER_ADMIN]
[SCRIPT_FILENAME]
[REMOTE_PORT]
[REDIRECT_URL]
[GATEWAY_INTERFACE]
[SERVER_PROTOCOL]


<a href="<?php echo $_SERVER['HTTP_REFERER']; ?>"><< Back</a>

LEAVE A REPLY

Please enter your comment!
Please enter your name here