Hello All,
I’m a first time poster so I feel a bit awkward asking for help on my first post.
I’ve been searching to try and find, probably what is a very simple fix to my mailer.php form. I’m using the mailer form to create a simple booking form. As such each mailer form will be on a different page i.e
one mailer on page bookforfriday.html, the same mailer on bookforsaturday.html etc etc. I have the problem that my mailer doesn’t tell me from which webpage the message was sent (which would solve my problem) so I get lots of booking but no idea for what day.
I’m looking to move this across from weebly (because it’s getting too big) but the weebly contact form told you from which webpage the mailer was sending from.
Am I missing something simple here? My current mailer looks like this:
<?php
$to = "abc@abc.com";
$subject = “Booking form”;
$headers = “From: (ENGLAS) www.abc.com”;
$forward = 1;
$location = “http://www.abc.com/request.html”;
$date = date (“l, F jS, Y”);
$msg = "Below is the result of your contact form. It was submitted on $date at $time.
";
$name = $_REQUEST[‘Full Name’];
$email = $_REQUEST[‘Email Address’];
$subject = $_REQUEST[‘Subject’];
$message = $_REQUEST[‘Message’];
if ($_SERVER[‘REQUEST_METHOD’] == “POST”) {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "
“;
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) .” : ". $value . "
";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header (“Location:$location”);
}
?>
Any help or suggestions will be gratefully received,
Simon