rvinikof Posted July 2, 2007 Share Posted July 2, 2007 I'm making a form and after they click submit, I'm using an if/else statement to verify that the username and password they entered are correct, if they are, I want it to open a specific webpage and then in the else statement, show a message and redirect them back to the form page. How do I use php to open a URL? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 2, 2007 Share Posted July 2, 2007 header('location: here.php '); Quote Link to comment Share on other sites More sharing options...
rvinikof Posted July 2, 2007 Author Share Posted July 2, 2007 I've tried that. Is that supposed to still work even if it doesn't have a .php extension? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 2, 2007 Share Posted July 2, 2007 it will work without php extension but the error page is what you will get Quote Link to comment Share on other sites More sharing options...
rvinikof Posted July 2, 2007 Author Share Posted July 2, 2007 how do i open a .html file without an error? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 2, 2007 Share Posted July 2, 2007 header('location:a.html'); note you will get the error from header if you dont have the page and yououtput something before the header read sticky above about the header Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.