Skip to main content
Participating Frequently
June 25, 2011
Question

Redirecting to another page on submit of INSERT

  • June 25, 2011
  • 1 reply
  • 317 views

Hi guys,

I am building a networking site for school. Most of the site works. I have one tweak I want to make and cant get it to work. On the landing page the person user has a choice to login or register. On the login he is redirected to Home on failure he is redirected to fail. How can I redirect on the registration. Cant seem to get this to work. It writes the user data from the form to the DB but I cannot get it to redirect to a secure page where it welcomes the new user. Page is built, lets call it welcome.php. Please can anyone tell me where I need to put the code and what the code is?

Thanks.

Owen

This topic has been closed for replies.

1 reply

MurraySummers
Inspiring
June 25, 2011

Put the code as the last thing before exiting the block of php that runs to register someone.

The code would be -

header("Location: http://www.example.com/your_redirect_page.php");

exit();