I want to redirect to another web page based on whether or not a user entered a correct username/password. So, I have an if statement that checks if the password is correct, and then I want to redirect to a menu if it is. Does anyone have advice on how to do this?
One could use a header(), e.g. header("Location: " . $uri);
though be warned that header() must be used before any output is written to the page.
Thanks. One more question:
Do I still have access to the $_POST['username'] data (from the original login page) in this new redirected page?
No. HTML is a stateless protocol, so you'll have to find some way to pass the data.
These ways include using cookies, sessions, or even passing by the query string in the URI.