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 Logging Error
When running the script on website it doesn't copy both input boxes, Only the user and not the password, Any help would be great.. Heres the code, It's suppose to log the username and the password,
Refining of search Criteria
Dear FriendsI need a help, I have a search page which of cars related, which has different search criteria e.g. maker, model, color, displacement etc. when i give any search criteria and click the
Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, the captcha auto makes a new1 so u cant submit.But if u enter captcha code alrdy, then submit form
Email Form Syantax Issue 2
How to make this look FROM:"OUR TEAM" instead of FROM:abc@mail.com$headers = "From:" .$themail."\r\n"
Do While statement
hi guys,This may sound trivial but im new to php and as part of an assignmenti have to construct the 10 green bottles song using the do while statement. I can do the statement but it is itengrating
having a small php error tha deals with the 'foreach'
Last night i was working on a script for a cart and it seemed to working good, until this morning. For some reason i'ts giving me the following error:Warning: Invalid argument supplied for foreach()
PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the field then its supposed to create a password in the file in md5 encryption like this
Shopping Cart
Can anyone direct me to a Simple, Basic structure of a shopping cart.New to classes. I want to store info in sessions and write to the db.Is this the right approach?newbee.Thanks,
Shuffle between users ??
I have multiple $users in table. I need to send them $message.I need to send the next message available in the database to the next user who got least amount of messages.Or how could I place those
need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working can someone please help me and show me what I have wrong so I can fix it heres the html form I left