PHP Back Button with search results intact

<?php if(strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'])) : ?> <a class="block back-to-results" href="<?php echo $_SERVER['HTTP_REFERER'] ?>"><i class="fa fa-arrow-circle-left"></i>Back To Results</a> <?php else : ?> <a class="block back-to-results" href="/"><i class="fa fa-arrow-circle-left"></i>Back To Home</a> <?php endif; ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.