I have created a PHP mail script. I am having a problem though. In $body i am trying to put two values side by side like so $Fname $Lname. Where ever i use
tag the values appear in the final message but where i place the values side by side without a
tag then the values do not appear in the final message. I have already tried encasing the values in quotes and separating them with commas with no luck. I am certain this is an easy fix but i just don't know how. Any ideas.....please!!!
Here is my code:
Code: <?php
if (isset($_POST) && !empty($_POST['Fname'])){
session_start();
$_SESSION['Fname'] = $_POST['Fname'];
}
if (isset($_POST) && !empty($_POST['Lname'])){
session_start();
$_SESSION['Lname'] = $_POST['Lname'];
}
if (isset($_POST) && !empty($_POST['email'])){
session_start();
$_SESSION['email'] = $_POST['email'];
}
if (isset($_POST) && !empty($_POST['phone'])){
session_start();
$_SESSION['phone'] = $_POST['phone'];
}
if (isset($_POST) && !empty($_POST['attend'])){
session_start();
$_SESSION['attend'] = $_POST['attend'];
}
if (isset($_POST) && !empty($_POST['number'])){
session_start();
$_SESSION['number'] = $_POST['number'];
}
if (isset($_POST) && !empty($_POST['trans'])){
session_start();
$_SESSION['trans'] = $_POST['trans'];
}
?>
<?php
/*subject and email variables*/
$emailSubject = 'Survivor or Care Provider Registration';
/*gathering data variables*/
$FnameField = $_POST['Fname'];
$LnameField = $_POST['Lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$attendField = $_POST['attend'];
$numberField = $_POST['number'];
$transField = $_POST['trans'];
$attend = implode(', ', $attendField);
$trans = implode(', ', $transField);
/*email field*/
$body = <<<EOD
<hr>
<h2>Registration Confirmation Email</h2>
<hr>
Name Registered: $Fname $Lname
Email Address: $email
Phone Number: $phone
Attending As: $attend
Bringing $number including $Fname $Lname
Will $Fname $Lname need transportation: $trans
Thank you for registering!
EOD;
/*email sender script*/
$sendto = $_POST['email'];
$headers = "From: auto-confirm@xxxxxxxxxxxx.comrn";
$headers .= "Bcc: webmaster@xxxxxxxxxxxx.comrn";
$headers .= "Content-type: text/htmlrn";
$success = mail($sendto, $emailSubject, $body, $headers);
/*resultes*/
$theResults = <<<EOD
<html>
<body>
Thanks!
</body>
</html>
EOD;
echo "$theResults";
?>
PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see when I view source, versus what I want to see … I am having image re-sizing issues that
Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.Currently im having a problem with a rather old piece of script i had written for a guestbook.The guestbook itself relies completely on the
Place specific image in html page when specific name is typed.
Hello,Fairly new to PHP and was curious if someone might know how to solve a fairly simple request.I am currently passing the name of an end user (who types their name in a form field) to a URL which
Parse Error
Hi Guys,I have a function in my class which returns a string link variable. The problem is it keeps giving me a parse error. See code below followed by error message:Code: function
question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.I have roughly 30 files. I want to be able to edit every $_POST and $_GETCode:
Changing files over
Just thought I'd start with the new forums looking really nice .Ok basically I've made this site www.sampleestateagent.com and the CMS and search function is all done for the buying part of the site.
Problem with Sending Mail by PHP
hello all, I m new to php, can u plz provide me the code to send mail by php having CAPTCHA code in the form.i m using the following code :career.phpLine number On/Off | Expand/Contract
Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief text details and a picture.Each of these listings has several images with it, that aren't seen unless
help countdown timers
hello every one,I'd like to know how to insert many countdowns in the same page.The duration of each must be different and defined by members with a form.
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it has to do with the several while loops that should be outputting the data. One more issue is that