-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 4 replies
- 2 views
-
- 1 reply
- 6 views
-
- 3 replies
- 2 views
-
Microsoft 365 launches High Volume Email in public preview with no per-minute message limits
By John Callaham,
- microsoft
- microsoft 365
- (and 3 more)
- 3 replies
- 2 views
-
- 0 replies
- 1 view
-
Question
LexL
Hello there,
i am hoping someone out there can tell me where im going wrong.
I have a website where i am trying to get potential customers to fill out 5 simple text boxes on a HTML page and for the text entries to be processed by PHP code to send an e-mail to my e-mail inbox.
I have put the following code together and after spending hours to get over Parse and syntax errors. It finally sends me an e-mail.
The problem being that none of the text entered onto the HTML form appears in the e-mail at the end.
Can you help?
Heres the code
Running 2 files - one for the PHP and one for the HTML page.
and here is the 2nd file with all the php code
- i believe the probelm lies when we get to the $body part:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>send.php</title>
</head>
<?php
$names = $_post['names'];
$email = $_post['email'];
$from = $_post['from'];
$dateto = $_post['dateto'];
$details = $_post['details'];
$to = "MY EMAIL ADDRESS HERE";
$subject = "Customer Enquiry";
$body = 'Name:'.$names .'Email:'.$email .'From:'.$from .'To:'.$dateto .'Details:'.$details;
mail ($to,$subject,$body);
echo "Thank you for your enquiry. Your Message has been Sent. You will be contacted as soon as is possible. <a href='http://www.stleonard.info/default.html'>Click Here";
?>
<body>
</body>
</html>
[/CODE]
Thanks !
Link to comment
Share on other sites
11 answers to this question
Recommended Posts