Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help sending a form via email

Status
Not open for further replies.

dthomas31uk

Technical User
Oct 19, 2003
107
GB
Hi,

Have a form on a webpage with various fields. All i need to do is send the information to an email address when someone submits it.
How easy is it to do and can someone help......not using a database just sending to an email address

Cheers

This is the basis of my form

<form name="theForm" method="post" action=test.php">

<select name="title">
<option value="Mr"><font face="Arial, Helvetica, sans-serif" size="2">Mr</font></option>
<option value="Mrs"><font face="Arial, Helvetica, sans-serif" size="2">Mrs</font></option>
<option value="Miss"><font face="Arial, Helvetica, sans-serif" size="2">Miss</font></option>
<option value="Ms"><font face="Arial, Helvetica, sans-serif" size="2">Ms</font></option>
<option value="Dr"><font face="Arial, Helvetica, sans-serif" size="2">Dr</font></option>
<option value="Prof"><font face="Arial, Helvetica, sans-serif" size="2">Prof</font></option>
</select>

<input type="text" name="fullname" size="50">
<input name="age" type="text" id="age" size="5" maxlength="2">
<textarea name="address" cols="35" wrap="PHYSICAL" rows="7"></textarea>
<input name="fan" type="checkbox" id="fan" value="checkbox">
<input name="highChair" type="checkbox" id="highChair" value="checkbox">
</form>

Hope someone can help...cheers guys
 
Use mail() to send your email. Simply populate the to, subject and any additional headers in the script and use $_POST superglobal array to concate your mail body from the submitted form fields.
 
If you just need a small Mail you also could use the function

bool mail(string to, string subject, string message [, string additional_headers])

for this. PHP-Mailer seems to be a little bit oversized for this rather small requirement, don't you think?
 
While on the subject of mail, is there any well documented examples for html mail with attachments .. its baffling the **** outta me .

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
see what you mean about phpmailer needed to develop you work on the web. but correct me if am wrong but will not need this phpmailer if am directly uploading my files to server on the web????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top