Current location: Hot Scripts Forums » Programming Languages » PHP » Modify headers information


Modify headers information

Reply
  #1 (permalink)  
Old 11-18-05, 11:17 AM
mcrob mcrob is offline
Coding Addict
 
Join Date: Jul 2004
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Modify headers information

Hey users whats up. I gotta question...

I made a "change email" page where the user can edited there email address. What I did was I made it so if they change there email address, there account activation gets turned off, an account instructions link gets sent to there new email address and after all of that, I wanted to redirect them to the logout page. But for some reason it keeps saying that the headers was already sent on line "whatever number" and in that line it has this

mail($to, $subject, $message, $header); // send the e-mail

Because its sending out the mail, the headers was already sent. therefore it wont allow me to make more than one header to be sent. Is it possible that I can make more than one header because I wanted to redirect the user to the logout page once they change there email address and the information gets sent to there email address.
Reply With Quote
  #2 (permalink)  
Old 11-18-05, 11:41 AM
mcrob mcrob is offline
Coding Addict
 
Join Date: Jul 2004
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Hey there I used the

ob_start();

ob_end_flush();

code. Since Im using this, will it be able to still send the mail out and redirect me to the loguout at the sametime?
Reply With Quote
  #3 (permalink)  
Old 11-18-05, 05:02 PM
eveccker eveccker is offline
New Member
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
You could always have a script like this:
PHP Code:

ob_start();


$to "email@blah.com";
$subject "Email change";
$message "You changed your email....";
$header "Blah";

mail($to$subject$message$header);
echo (
"<meta http-equiv=\"Refresh\" content=\"0; URL=logout.php\"/>You have changed your email, and you are now being redirected.."); 
Thats something you can use, i think, i put it together quickly so i dunno if it will work. O well.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: Cannot modify header information - headers already sent by netbakers PHP 1 07-09-05 12:55 AM
cannot modify header kalinchuk PHP 13 06-02-05 01:18 AM
Grabbing using information in Windows environment... SeanH PHP 1 05-20-05 07:12 AM
retaining information between pages davidklonski PHP 0 05-31-04 05:36 PM
very strange functions issue jolac PHP 3 05-13-04 01:54 AM


All times are GMT -5. The time now is 06:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.