Welcome to WebmasterWorld Guest from 54.162.19.123

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

redirecting a user to main page after Submit button is clicked

     
9:39 am on Apr 5, 2013 (gmt 0)

New User

joined:Mar 18, 2013
posts: 2
votes: 0


Hi,
I am trying to redirect to the main page when the user clicks save button.
My main page is main.php contains Questions.
For answering the Questions i give link to the another page for answering.After Saving the answer sheet, the form submits
and not redirects to the main.php. please tell me how to do that
11:14 am on Apr 5, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10848
votes: 61


welcome to WebmasterWorld, tweety!


after processing the form, your HTTP Response should start with a 301 status code and a Location: header referring to the main.php url
12:30 pm on Apr 5, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


You MUST process the submitted form data before returning the redirect response as POST parameters are stripped in a redirect.