0

I have created a basic html contact form, and I am using PHP to send the email. However, since I am being hosted by Github, I am getting linked to an error page where Github says "The request made was to forbidden content. Sorry about that. Please try refreshing and contact us if the problem persists." Is there a way to fix this?

Here is my HTML:

<form action="contact.php" method="POST">
    <div class="contactinfo">
         <label>
             <span>NAME:</span>
             <input type="text" name="name">
         </label>
         <label>
             <span>E-MAIL:</span>
             <input type="email" name="email">
         </label>
    </div>
         <label>
             <span>MESSAGE:</span>
             <textarea name="message"></textarea>
             <input class="button" type="submit" value="Send">
         </label>
</form>

PHP:

<?php 
$email_to = "example@gmail.com";
$email_subject = "RE: Contact Me";
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$email_message .= "Name: ".clean_string($name)."\n";
$email_message .= "Message: ".clean_string($message)."\n";
$headers = 'From: '.$email."\r\n".
'Reply-To: '.$email."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
?>
user3344484
  • 199
  • 1
  • 1
  • 9

0 Answers0