Jump to content

multipage form


kaspm

Recommended Posts

[!--quoteo(post=371058:date=May 3 2006, 01:40 PM:name=kaspm)--][div class=\'quotetop\']QUOTE(kaspm @ May 3 2006, 01:40 PM) [snapback]371058[/snapback][/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:

[code]
//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);
[/code]

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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.