Jump to content


Photo

multipage form


  • Please log in to reply
1 reply to this topic

#1 kaspm

kaspm
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 03 May 2006 - 08:40 PM

Hi, I have a multipage form I want to send to an email address. Do I have to use:

mail($whatever && $next

for all the fields or would there be an eaiser way to do it.
Thanks

#2 todd3834

todd3834
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 03 May 2006 - 08:50 PM

[!--quoteo(post=371058:date=May 3 2006, 01:40 PM:name=kaspm)--][div class=\'quotetop\']QUOTE(kaspm @ May 3 2006, 01:40 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi, I have a multipage form I want to send to an email address. Do I have to use:

mail($whatever && $next

for all the fields or would there be an eaiser way to do it.
Thanks
[/quote]

It really depends on how you want to format your message, here is an example of a way to send the mail:

//this will show whatever is entered in the fullname input on your form 
//<input type="text" name="fullname">
$mail_body = "Name: " . $_REQUEST['fullname'] . "\n"; 
// "\n" sends it to the next line
$mail_body .= "Email: " . $_REQUEST['email'] . "\n"; 
$mail_body .= "Message: " . $_REQUEST['message'];
// ".=" is used for adding to the end of the string that already exists

mail("youremail@whatever.com", "Your Subject", $mail_body);

If you would like to use HTML in your message or you would like to modify the e-mail headers so that you can use CC, BCC, or other features. For more information about using the mail function and some better examples than the one i wrote above go straight to the comments on the online documentation.

[a href=\"http://www.php.net/function.mail\" target=\"_blank\"]http://www.php.net/function.mail[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users