Members visiting out Club Web Site can enter their 'Member Number' into a textfield and the below PHP scrip re-directs them to their own member.html I want to know how I can re-direct them to an error.html if anything other than a member number or an incorrect number is entered. Any help please <?php $host = 'http://www.mysite.co.uk/member_secure/'; $uri = 'member_files/'; $memberID = $_REQUEST['member']; $extra = $memberID.'.html'; header ("Location: $host$uri$extra"); exit; ?> PHP:
It's neither stored in a database nor is it autogenerated. All the members HTML pages are in a folder call 'member_files' and the PHP selects them. Is there a coding which can be added to say that if the member.html isn't there then goto error.html.