Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » Blog Archive » How do I go back in the browser in PHP?

How do I go back in the browser in PHP?

You can use javascript to back a page: history.go(-1)

Eg:

Code:
<a href=”#” onclick=”history.go(-1)”>Back</a>

Or you can use PHP code to determine which page they came from and create link like:

Code:
<a href=”<?=$_SERVER[’HTTP_REFERER’]?>”>Back</a>

Posted by Suresh B

Leave a Reply

You must be logged in to post a comment.