Hello,
I am having problems with a form mail script that I did, I can not get it to work. I get a server 500 error when I hit the submit button. I am new to PHP programming and need some help please ! Listed below is my html code and the PHP code that I put into the CGI folder on my sever. Also , I dont know if this make a difference or not but the e-mail that I want the form information to goto is a .net address and is not the same .com as the site. Any suggestions would be very welcome !! Thanks everyone !!!
HTML Form Code
form action="http://www.sw-vai.com/cgi-bin/fmail.php" method="post" enctype="text/plain" name="contact" target="_blank" id="contact">
<p class="style1"><strong>Email:</strong>
<label><br />
<input name="first_name" type="text" id="first_name" tabindex="1" size="45">
</label>
</p>
</br>
<p class="style1"><strong>Company Name:</strong>
<label><br />
<input name="company_name" type="text" id="company_name" tabindex="2" size="45">
</label></p></br>
<p class="style1"><strong>Your Name:</strong><br /><label>
<input name="your_name" type="text" id="your_name" tabindex="3" size="45">
</label>
</p></br>
<p class="style1"><strong>Contact Number:</strong><br />
<label>
<input name="contact_number" type="text" id="contact_number" tabindex="4" value="Example: 555-555-5555" size="45”></label>
</p></br>
<li class="style1"><strong>Question or Product Inquiry: </p><label>
<textarea name="question_products" cols="80" rows="10" id="question_products" tabindex="5"></textarea>
<br>
<input type="submit" name="submit" id="submit" value="Submit" tabindex="6">
</label>
</strong></br>
<input name="recipient" type="hidden" id="recipients" value="swcontrol@swcontrol.net">
<input name="redirect" type="hidden" value="http://www.sw-vai.com/thankyou.html">
</form>
PHP CODE
<?PHP
$first_name = $POST[“first_name”];
$company_name = $POST[“company_name”];
$your_name = $POST[“your_name”];
$contact_number = $POST[“contact_number”];
$question_products = $POST[“question_product”];
mail( swcontrols@swcontrol.net, $first_name, $company_name, $your_name, $contact_number, $question_product ) ;
header(“location: http://www.sw-vai.com/thankyou.html”);
?>