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

Forward page on submit

Participant ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

I am submitting a page using php_self.  When the user submits it is sending an email to a user.  After the email is sent, I want to go back to the menu.  So I have something like

isset(php_self)......

email fields

email function

then using header to redirect but I never leave the page.  In my form, I have redirect as the name of a field and the value as index.php.  I have tried to move this header to different parts with no success.

Dont have the code with me but can post later if needed.

TOPICS
Server side applications

Views

373
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
New Here ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

LATEST

I haven't worked with php in a while because I switched to asp.net, but this is what I had on one of my form pages to redirect to another:

- Put this code directly after the <? at the top:


header("Location: index.php");

If you have this already, make sure all the quotation marks and semicolons are all there. Its an easy mistake.

Its the only help I can give, but that code works for me.

-- Carrion Misery

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