The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Question about this form script

How can I change it so that is displays the name or the variable and then the actual variable itself. Eg it will say "name:" and then the name the user has input into the name field.

Code PHP:

<?php$mail_recipient="Jeremywoods@xtra.co.nz";$mail_subject="Enquiries";$Name=Trim(stripslashes($_REQUEST['Name']));$Email=Trim(stripslashes($_REQUEST['Email']));$Company=Trim(stripslashes($_REQUEST['Company']));$Address=Trim(stripslashes($_REQUEST['Address']));$Phone=Trim(stripslashes($_REQUEST['Phone']));$Comments=Trim(stripslashes($_REQUEST['Comments']));$Body="";$Body.=$Name;$Body.=$Email;$Body.=$Company;$Body.=$Address;$Body.=$Phone;$Body.=$Comments;$headers='MIME-Version: 1.0'."\r\n";$headers.='Content-type: text/html; charset=iso-8859-1'."\r\n";// send email $success=mail($mail_recipient,$mail_subject,$Body,$headers);if($success==true)echo"Your mail has been Sent Successfully";elseecho"Your mail has Not Sent Successfully";?>