I’m trying to have this user input form submitted to my email from the website. I’ve been told i need php to do this and so I’ve been looking at various codes. I will include the HTML form code as well as the PHP code below. Any help will be greatly appreciated! Please email me with any help or solutions!
Thank you!
[php]
<?php $Client_name = $_POST['name']; $Client_Phone = $_POST['phone']; $Client_email = $_POST['email']; $Type_of_Computer = $_POST['type of computer']; $Brand = $_POST['brand']; $Model = $_POST['model']; $Operating_Sytem = $_POST['OS']; $Errors_and_Issues = $_POST['Errors']; $email_from = '[email protected]'; $email_subject = "Client Form submission"; $email_body = "You have received a new message from the user $Client_name.\n". "Here is the message:\n $Client_name, $Client_Phone, $Client_email, $Type_of_Computer, $Brand, $Model, $Operating_System, $Errors_and_Issues". $to = "[email protected], [email protected]"; $headers = "From: $email_from \r\n"; $headers .= "Reply-To: $visitor_email \r\n"; mail($to,$email_subject,$email_body); ?>[/php]
<html>
<body>
<form method="post" action="http://www.lfpctech.net/thanks/">
<p>Fields with * are required.</p>
<fieldset><legend>Client Information</legend>
<div class="field-item"><label>Name: *</label> <input maxlength="150" size="30" id="Client_Name" name="Client_Name" type="text" title="" /><br /></div>
<div class="field-item">
<div><label>Phone: *</label> <input maxlength="20" size="20" id="Client_phone" name="Client_phone" type="text" title="" />
<p class="small">(555) 555-0000</p>
</div>
</div>
<div class="field-item">
<div><label>E-mail Address: *</label> <input class="" maxlength="30" size="20" id="Client_Email" name="Client_Email" type="text" /></div>
</div>
</fieldset>
<fieldset><legend>Computer Information</legend>
<div class="field-item">
<div>
<p>Type of Computer: *<select name="Type" size="1">
<option>Desktop/Tower</option>
<option>Laptop</option>
<option>Netbook</option>
<option>Custom</option>
</select></p>
</div>
<div class="field-item">
<div>
<p>Brand: *<select name="type" size="1">
<option>Acer</option>
<option>Asus</option>
<option>Compaq</option>
<option>Dell</option>
<option>Emachines</option>
<option>Gateway</option>
<option>HP</option>
<option>Lenovo</option>
<option>Sony</option>
<option>Toshiba</option>
<option>Custom</option>
</select><br /></p>
<div class="field-item">
<div><label>Model Number:</label> <input type="text" name="mnumber" /></div>
</div>
<div class="field-item">
<div>
<p>Operating System: *<select name="type" size="1">
<option>Windows XP</option>
<option>Windows Vista</option>
<option>Windows 7</option>
</select></p>
</div>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset><legend>Errors and Issues</legend>
<div class="field-item">
<div>
<p>Tell us what errors or issues you are experiencing, please try to include any error messages as best as possible *</p>
<textarea rows="10" cols="100">
</textarea>
<br />
<br />
<input type="submit" value="Send" /> <input type="reset" value="Reset" /></div>
</div>
</fieldset>
</form>
</body>
</html>