Within my Club Site members can enter their Membership Number into a textfield and the below PHP re-directs them to their own Details Page.html. I want to be able to send others to an error.html if none membership numbers are entered. Any help please <?php $host = 'http://www.mysite.co.uk/members_secure/'; $uri = 'member_files/'; $memberID = $_REQUEST['member']; $extra = $memberID.'.html'; header ("Location: $host$uri$extra"); exit; ?> PHP:
if(!$_REQUEST['member']) header("Location: error.html"); is that what you want? Also, there's no need to use exit if the script ends anyway