|
Answer» I have my promt in a button, using an onclick event.
How would I make it email me what the user types in?Are you using JavaScript? JS can't email.
Have a look here. PHP is a fun, safe reliable tool for this job. Most commercial servers run it these days. this form uses the POST method (a special HTTP REQUEST which hides the users input)
code for page with form to take user input **********************************
Your Name:
Your Email:
---- end page
code for page which recieves user input (the code in the first page NEEDS to know this pages name. In page 1 it assumes this page is called mailSender.php) ******************************************************************************************************************
// POST GETS data from referencing page $body_of_email=$_POST['msg']; $ad= $_POST['addy'];
$len = strlen($ad); $pos = strpos($ad, '');
//check for common typos if($ad==null || $pos ==false || $len<6) { echo "You forgot, or entered the wrong email address PLEASE click back and enter address."; }
else{ if (mail( '[email protected]', 'An email from some WEBSITE', $body_of_email, $ad)) { echo ""; echo(" Message successfully sent!"); echo " Continue "; } else { echo(" Message delivery failed..."); } }
?>
----end page---------you could try HTML "mailto:" hyperlink.Yes this would work:
mailto:[email protected]
BUT I want the forms to be on my website.Additionally, Mailto: is a spam magnet.A completely shameless link to my own site.
Quote from: BC_Programmer on February 12, 2009, 07:42:29 AM Additionally, Mailto: is a spam magnet.
good point,
Quote from: macdad- on February 12, 2009, 12:10:16 PM
Quote from: BC_Programmer on February 12, 2009, 07:42:29 AMAdditionally, Mailto: is a spam magnet.
good point,
yeah, learned about that the hard way myself.
Try over 8000 e-mails under my old E-mail account.
|