sorry my bad, I thought rather than litter the page with wonky code it would be available from the page source - but I understand how time consuming that would be, apologies
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$product = $_POST['product'];
$rating = $_POST['rating'];
$review = $_POST['review'];
$mailTo = "hello@kickasssoftwear.uk";
$headers = "Product Review from: ".$name;
$txt = "You have received a product review from: ".$name. "\n for: ".$product. "\n rating is: ".$rating."\n review: ".$review;
mail($mailTo, $headers, $txt);
header("Location: send.php?mailsend");
}
all of that works good enough.
I am not aiming for the most robust or secure forms, because I'll be sending follow up emails to customers asking for them to review the products - whether they do or not is up to them, and it's unlikely that after being invited to do so will they spam it. And any reviews that come in from any other source (that hasn't been asked to do so) will most likely get trashed anyway because it wouldn't be a verified purchase - just saying all that before any comments about those concerns.
the page loads with ?mailsend in the search bar - but way down in the centre of the page is where I want to get a message to the customer and it's just not happening.
<div class="errorPage-container">
<h3>Thanks <?php echo ($_POST['name']); ?>.,</h3>
<p>Your review has been sent</p>
</div>
I am sure the problem lies with the html wrapped around the PHP tags, but I've tried so many different ways without success & I can't figure out how to output the message in PHP without the need to wrap it in html
Thanks