FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » php redirection question(answered)

   
Author Topic: php redirection question(answered)
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
okay, I had to create a form for a website that took the data and inserted it into a database and that also sent an email to a recipient with the data from the form, and then redirects to another html page.

i submit the form data to a php page which handles the insertion and the email sending, but I don't know how to redirect at this point. I only know the header() function but that doesn't work because of the variables passed to the page right? is there another way to redirect to another page? maybe not even php related, but it has to run after all the code is executed.

or is there a completely different way to do this?

[ May 02, 2008, 02:40 AM: Message edited by: Strider ]

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
HollowEarth
Member
Member # 2586

 - posted      Profile for HollowEarth   Email HollowEarth         Edit/Delete Post 
Why can't you call header() at the end of the code block? header() only has to come before any of the rest of your code outputs the page, database stuff and sending email shouldn't effect it.
Posts: 1621 | Registered: Oct 2001  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
oh, never mind, i'm an idiot. i had some html being outputted before the header() call.
Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2