|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I've seen a lot of questions about redirecting, but none of the solutions have worked for me so far. I'm trying to redirect users to a new location after the form has been processed. The form/page basically lets the user change his/her name and password. When they click "Submit" it posts the data and updates the database, and then returns to the same page.
I'd like to have them fill out the data, click "Submit" and once the database updates the info, have them sent to a different page. Can this be done? Any assistance is very much appreciated. I know there's quite a few people looking for this same answer. Thanks to all of you for the help. Sintrigue |
|
#2
|
|||
|
|||
|
PHP Code:
this is the way to redirect such a script. I use it. And it workes fine. - pheifel [edited for spelling error] |
|
#3
|
|||
|
|||
|
Thanks for the assistance, Pheifel. Unfortunately I'm still getting an error saying header info was already output to the browser. I am using sessions to check security, in case that matters (not sure if it does, very new to this). Any suggestions?
Thanks again! Sintrigue |
|
#4
|
||||
|
||||
|
for the header info problem try using ob_start(); and ob_flush();, also check and make sure there is no blank space before your code, because that can cause issues as well
|
|
#5
|
|||
|
|||
|
before the redirect by the header. There can be send Absolutely >>NO<< text or other things to be displayed by the browser. And perhaps (im not sure..) you need a session_start(); in the beginning of the document.
|
|
#6
|
|||
|
|||
|
I am not sure if your situation has been solved or not. Or even if you do know this already. When I was encountering the same error it was due to me having:
PHP Code:
rather than PHP Code:
Hope that helps |
|
#7
|
|||
|
|||
|
You all have been great! I had some brain dump, I guess, because I had two forms on the same page trying to submit to different places. Once I started entering the code above, I found my mistake. Works great - THANKS!
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Redirect AFTER form is processed? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|