|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
mail
Hi,
I am using a PHP script to gather information and send an email. The email works fine, but some of the information is stored in various arrays created when users check a check box, or from a hidden field, and when I send the email I only receive the 1st value from each array. How can I get all the values to display in an email simply by using $message =? |
|
#2
|
|||
|
|||
|
RE: mail
Here's what I use, after checking for empty fields, maybe you can modify your code to use it too. This is at the bottom of a long form:
else { $message = "Name: $NamenEmail: $EmailnComments: $Commentsn"; $header = "From: $NamernReply-To: $Emailrn"; mail ("webmaster@yourdomain.com", $subject, $message, $header); echo "<body bgcolor='silver'>"; echo "<title> Feedback from $Name </title>"; echo "<center><img src='images/logo.jpg' width=250><p>"; echo "<center><p class=bodymd><b>Thanks for your feedback, $Name.</b></p>"; echo "<p class=bodymd><b>A response will be sent to <a href='mailto:$Email'>$Email</a>.</b></p>"; echo "<meta http-equiv='Refresh' content='10; url=index.php'>"; echo "<a href='index.php'><b>Back to yourdomain.com</b></a>"; } |
|
#3
|
|||
|
|||
|
RE: mail
Well, I would look into using the foreach loop...do something like this:
foreach($checkarray as $val) { $message .= $val . "n"; } What's probably happening now is that you are only assigning the first element, you need to loop through each element in order to get them in the message variable.. Matt |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > mail |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|