Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Redirecting to another page on submit of INSERT

New Here ,
Jun 25, 2011 Jun 25, 2011

Copy link to clipboard

Copied

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

TOPICS
Server side applications

Views

287
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 25, 2011 Jun 25, 2011

Copy link to clipboard

Copied

LATEST

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();

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines