0

I'm fairly new to PHP but have used HTMl and CSS for 3 years now.

I apparently have an error on line 10 mail

($to, $subject, $message, "From: " $name . $email);

Full code:

PHP

<?php
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
$to = "jamiemeechan@outlook.com";
$subject = "Email from Tropilac.com"
mail ($to, $subject, $message, "From: " $name . $email);
echo "Your message has been sent";
?>

HTML

<form action="/scripts/contact.php" method="post" name="contact">
<p>Name:</p>
<input name="name" type="text"/>
<p>Email:</p>
<input name="email" type="text"/>
<p>Messgae:</p>
<textarea name="messgae" cols="25" rows="5"></textarea>
<br>
<input type="submit" name="submit" id="submit" value="Send!"/>
<input type="reset" name="reset" id="reset" value="Reset"/>
</form>

Yes I have the PHP file in a folder called scripts.

Tropilac
  • 43
  • 1
  • 9

0 Answers0