Keep getting this error I’m trying to get my form to send Name,Phone,emal and Message.
Warning: mail() expects at most 5 parameters, 7 given in /home/content/70/7210770/html/beta/contact.php on line 9
We encountered an error sending your mail
<form method="post" action="contact.php">
<label for="name">Name:</label>
<input type="text" name="name" id="name" required placeholder="Name" />
<label for="phone">Phone:</label>
<input type="text" name="phone" id="phone" required placeholder="(555)555-5555" />
<label for="email">Email:</label>
<input type="email" name="email" id="email" required placeholder="[email protected]" />
<label for="message">Message:</label>
<textarea name="message" id="message" required></textarea>
<input type="submit" value="Send Message" />
</form>
[php]<?php
$to = “myemail”;
$subject = “Sky East Photo website submission”;
$name = $_REQUEST[‘name’] ;
$phone = $_REQUEST[‘phone’] ;
$email = $_REQUEST[‘email’] ;
$message = $_REQUEST[‘message’] ;
$headers = “From: $email”;
$sent = mail($to, $subject, $name, $phone, $email, $message, $headers) ;
if($sent)
{print “Your mail was sent successfully”; }
else
{print “We encountered an error sending your mail”; }
?> [/php]