Current location: Hot Scripts Forums » Programming Languages » PHP » OK I give up - need help emailing form info


OK I give up - need help emailing form info

Reply
  #11 (permalink)  
Old 10-27-04, 02:46 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
I know it's not perfectly efficient but I posted it like that for 2 reasons:
1) It's exactly the same code as he already has, just moving the lines around.
2) It teaches dealing with associative arrays in the future eg, the email address as $key and the real name as $value.
in that case, this is acceptable..
Quote:
I'm afraid I broke a rule I have "Don't post unless you are sure". The syntax I gave for mail() is wrong, this is correct:

$to = "mary@example.com" . ", " ; // note the comma not semi-colon
$to .= "kelly@example.com";
if we work on the basis of php manual, yes it's true. however, i prefer to use semicolon to separate the mail address in order to distinguish params and literal string. although zend vm will read $to as string which results in comma (,) interpreted as literal comma and not as param. i discourage this method for the reason of consistency. but hey, i'm not the core dev there, so this is just more like individual taste.
__________________
just an ignorant noob with moronic solution...
Reply With Quote
  #12 (permalink)  
Old 10-27-04, 10:37 PM
2jesters 2jesters is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Hey, I don't care what the rest of the world says about you, you guys are greatest. I've got the site working, but now I have one more little problem. I want to go to a http:// thankyou page after the emails are send to the publishers to thank the subscribers. I've tried everything I know and can't get it to work. I know it's simple, but I'm just not getting it, so if you could help me with that I would be forever greatful. Also, do you know the format autoresonders use for the information fed to them from mail()?

Thanks,
2jesters

Last edited by 2jesters; 10-27-04 at 10:39 PM.
Reply With Quote
  #13 (permalink)  
Old 10-28-04, 12:30 AM
marklar's Avatar
marklar marklar is offline
Newbie Coder
 
Join Date: May 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know about the autoresponder thing but the redirect is easy:

header("Location: http://www.mydomain.com/");

The only thing to remember is that you cannot send anything else to the browser after it. THIS IS WRONG

header("Location: http://www.example.com/");
echo "This will cause an error";

A good way of preventing that is to put an exit command right after it like this:

header("Location: http://www.example.com/");
exit;
Reply With Quote
  #14 (permalink)  
Old 10-28-04, 07:13 AM
2jesters 2jesters is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for all your help!!!
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
formmail problem gscraper Perl 12 08-27-04 03:06 AM
Adding to an existing PHP script to drop form info into an Excel ss jerryh0707 PHP 1 07-21-04 03:03 PM
Limit the form submission according to time bionicsamir PHP 7 05-09-04 11:10 PM
Emailing a form HUH? icesayain2k HTML/XHTML/XML 5 01-13-04 12:13 PM
SQL database registration form help vinhkhuong PHP 3 10-10-03 03:49 AM


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