I’m trying to make a form where the user or client fills it out and then hits submit which would then send it to the
receiving email address provided. However, every time I hit submit or try it out, it seems like it would work, and then I check my inbox where there is no new message. Any help on making this possible would be great. I will include both the HTML and PHP code below that I have been working with. The HTML i worked from scratch,however, I’m new to php and cannot seem to make the magic happen. If you want, you may email me your thoughts at [email protected], which would be easier for me, or you could simply post here and I will check it when i can. Thank you for your help!
[php]<?php
if($_POST[‘submit’] == “Submit”);
$Client Name = htmlspecialchars ($_POST[‘name’]);
$Client phone = htmlspecialchars ($_POST[‘phone’]);
$Client Email = htmlspecialchars ($_POST[‘email’]);
$Type of Computer = htmlspecialchars ($_POST[‘type of computer’]);
$Brand = htmlspecialchars ($_POST[‘brand’]);
$Model = htmlspecialchars ($_POST[‘model’]);
$Operating Sytem = htmlspecialchars ($_POST[‘OS’]);
$Errors and Issues = htmlspecialchars ($_POST[‘Errors’]);
$formcontent = “From: $Client Name \n Phone: $Client phone \n Email: $Client email \n Computer: $Type of Computer \n Brand: $Brand \n Model: $Model \n OS: $Operating System \n
Errors: $Errors and Issues \n;
$recipient = "[email protected]”;
$subject = “Client Form”;
$mailheader = “From: $Client email \r\n”;
$email_from = ‘[email protected]’;
$email_subject = “Client Form”;
$to = "[email protected]";
$headers = “From: $Client email_from \r\n”;
mail($to,$email_subject);
mail($recipient, $subject, $formcontent, $mailheader);
?>[/php]
[code]
Fields with * are required.
Client Information(555) 555-0000
Type of Computer: * Desktop/Tower Laptop Netbook Custom
Brand: *
Acer
Asus
Compaq
Dell
Emachines
Gateway
HP
Lenovo
Sony
Toshiba
Custom
Operating System: * Windows XP Windows Vista Windows 7
Tell us what errors or issues you are experiencing, please try to include any error messages as best as possible *