Firstly, remove those comments (<!-->) those are HTML comments.
In PHP, we use either, // or /* comment */, to specify comments.
In the line where you define headers, replace it with:
PHP Code:
$headers = "From:" . $email;
If you write a variable within quotes, it's value will nt be returned by PHP.
So your final code would be:
PHP Code:
<?php
$to = "myemail@domain.co.uk";
$subject = "Website Order";
$email = $_REQUEST['one']; //checkbox 1
$message = $_REQUEST['two']; //check box 2
$headers = "From:" . $email;
if(mail($to, $subject, $message, $headers)) {
echo "Your mail was sent successfully"; } else { echo "We encountered an error sending your mail"; }
?>
Anyway, getting email and message from checkboxes? Are you sure about what your doing? For your information, check boxes return boolean values(true or false), and I don't think you would want a true or false as your email and message
May be you want to make it display some message if a chech box is selected:
PHP Code:
if ($_REQUEST['one'] = true) {
$message = "Option 1 was selected";
}
Bookmarks