<?php $uri = getenv('REFERER'); $uri = filter_input(INPUT_SERVER, 'REFERER', FILTER_UNSAFE_RAW); ?> <a href="<?php echo $uri?>">Back</a>