Hello there guys, and thank you for reading...
I could not find a php section, so i am posting this here.
I am working on a website for my company (http://www.laundrotech.net)
The inputs I need from the customer are:
First name
Last name
Adress:
Phone Number:
Brand:
Model Number:
Serial Number:
Estimated Data Of Purchase:
I have a Vbulletin website, which is PHP, and it supports html on the widgets...
so ... I think I need a html form, and a php code to send the email. but I do not know how to do it.
I am trying to avoid using the database to store this info... if the info goes directly to my email, that should be fine.
Thank you very much...
Loading

Kirtan PatelRank #292 · 8.6K reputationPosted Jan 16, 2011, 6:07 PM EST
HTML FORM(Form.html) html> body> form action="SendMail.php" method="post"> table> tr> td> First Name td> td> input type="text" name="txtFirstName" style="width: 203px" /> td> tr> tr> td> Last Name td> td> input type="text" name="txtLastName" style="width: 205px" /> td> tr> tr> td> Address td> td> input type="text" name="txtAddress" style="width: 206px" /> td> tr> tr> td> Phone No td> td> input type="text" name="txtPhone" style="width: 206px" /> td> tr> tr> td> Brand td> td> input type="text" name="txtBrand" style="width: 204px" /> td> tr> tr> td> Model No td> td> input type="text" name="txtModelNo" style="width: 205px" /> td> tr> tr> td> Serial No td> td> input type="text" name="txtSerialNo" style="width: 203px" /> td> tr> tr> td> Estimate Date of Purchase td> td> input type="text" name="txtEstimateDate" style="width: 204px" /> td> tr> tr> td> input type="submit" name="btnSubmit"/> td> tr> table> form> body> html> PHP CODE(SendMail.php) -------- $firstname = $_POST["txtFirstName"]; $lastname = $_POST["txtLastName"]; $address = $_POST["txtAddress"]; $phone = $_POST["txtPhoneNo"]; $brand = $_POST["txtBrand"]; $modelno =$_POST["txtModelNo"]; $serialno =$_POST["txtSerialNo"]; $estimate_date =$_POST["txtEstimateDate"]; $body = "First Name :".$firstname."\nLast Name".$lastname; mail("[email protected]","Test Subject",$body,"",""); echo "mail Sent" ?>Lucas Costa10 reputationPosted Jan 16, 2011, 6:14 PM EST
thiago costaRank #6,113 · 276 reputationPosted Jan 17, 2011, 9:30 AM EST
I copyed and pasted your own code, and added the body values.
Your a genious bro.
$body = "First Name :".$firstname."\nLast Name :".$lastname."\nAddress :".$address."\nPhone :".$phone."\nBrand :".$brand."\nModel No :".$modelno."\nSerial No :".$serialno."\nEstimated Purchase Date :".$estimate_date ;
Because I was only getting the first and last name,
Kirtan,
Thank you very much my friend...
You gave my day many lights..
Thank you
--Note--
I am helping lucas (my brother)
I am actualy going to use this form on my website as well !
You just helped 2 people with 1 answer bro !!
Our website are twins !!!
Check it out !!
www.laundrotech.net --Lucas
www.ultracomputers.info --Mine
On the service request page of lucas's site, theres where your code is :D
thiago costaRank #6,113 · 276 reputationPosted Jan 17, 2011, 9:59 AM EST
Kirtan PatelRank #292 · 8.6K reputationPosted Jan 17, 2011, 5:00 PM EST
write
header('Location: http://www.example.com/');to redirect to another page after sending mail ..
Lucas Costa10 reputationPosted Jan 17, 2011, 5:28 PM EST
I tried it on the last line after the echo it didn't work,...
Then I tried it at the beginning of the code, and it worked.
Thx ! your help is very much appreciated.