I\'m currently working on a mobile site with authentication using PHP sessions with a database. I have a login page with a form that goes to server_login.php
you may want to put a break; after your location:
header("HTTP/1.1 301 Moved Permanently"); header('Location: '. $YourArrayName["YourURL"] ); break;