The url to my site is [snipped].
There are a few sub pages on my site, (called "features", "benefits", and "read more".) I wanted to know how to make the button on the bottom of these pages that says "home" link to the previous page, instead of linking to the home page (index).
If anyone can help, I'd greatly appreciate it.
Thank you!

Recommended Answers

All 2 Replies

<input type=button value="Back" onClick="history.go(-1)">

<?php if (isset($_SERVER['HTTP_REFERER'])) { echo "<a href='$_SERVER['HTTP_REFERER']'>back</a>"; } else { echo "<a href='javascript:history.go(-1)'>back</a>"; }?>

Thank you! This worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.