Tech Support Guy banner
Status
Not open for further replies.

Solved: php email form help

814 views 0 replies 1 participant last post by  Dr.Zoidberg 
#1 ·
Hello,

I keep getting a 500 internal server error on a website I am currently designing. PHP5 is enabled and the php file is in the same directory as the contact us page. http://www.pantheonhomes.net/content/Contact Us.html

Form code
Code:
    <form method="POST" action="sendmail.php" name="Contact Form" id = "Contact Form">
      <p>
        <label>Name :
        <input name="Name" type="text" id="Name" size="20" maxlength="50"/>
        </label><br /><br />
        <label>Email : 
        <input name="Email" type="text" id="Email" size="20" maxlength="50" />
        </label><br /><br />
        <label>Contact Number :
        <input name="Contact" type="text" id="Contact" size="10" maxlength="15" />
        <br />
        </label>
      </p>
      <p>
        <label>Your Enquiry : <br />
        <textarea name="enquiry" id="enquiry" cols="21" rows="5"></textarea>
        </label>
      </p>
      <p>
        <label>
        
            
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" id="submit" value="Submit"/>
           
        </label>
      </p>
    </form>
sendmail.php
Code:
<?php
  
  $to  =   "*";
  $name = $_REQUEST['Name'] ;
  $email = $_REQUEST['Email'] ;
  $contact = $_REQUEST['Contact'] ;
  $enquiry = $_REQUEST['enquiry'] ;
  
  $body  =  "From: $name\n E-Mail: $email\n Contact: $contact\n Message:\n $enquiry";

  mail( $to, "Panthon Website Contact Form", $body, "From: $Email" );
  exit;

?>

    
    
    <br />
    <p>Thank you for your email. Please click <a href="../index.html">here</a> to return to the homepage if you are not automatically redirected.</p>
Thanks for any help!:up:
 
See less See more
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top