I want to make this simple one input form, but since mailto doesn’t work the way I want it to, and I don’t know PHP or CGI, what should I do!
[code=php] <?php //let's see if the form was filled out $filled = $_POST['filled']; if($filled) { //who should this be sent to? $mail_to = '[email protected]'; //what is the eMail subject? $subject = 'eMail Subject Line'; //what should the message be? $msg = " Someone recently submitted their eMail address: eMail Address: {$_POST['email']"; //use visitors eMail add'y as From $from = $_POST['email']; //actually mail the form input $form_send = mail("$mail_to", "$subject", "$msg", "From: $from"); } else { //the form wasn't filled out yet, so let's display it! ?> <form name='contactform' action='file.php' method='post'> What is your eMail Address:<input type='text' name='email' id='email'> <input type='submit' name='submit' value='send form'> </form> <?php } //end else[/code]
Help @katrostar spread the word by sharing this article on Twitter...