In order to collect addys for a newsletter: On my new website I have a text box, and a button. (among other things ). When the person types their email address in the box, and hits the button, I want their email address sent to my email box. How do I attach that code, to that button-press? Just point me in the right direction, I'll figure it out from there. Thanks.
This wil help you get started, remeber to read the code aswell, to help you learn how to manually implement it. http://www.bontragercgi.com/Code_Generator_for_Feedback_or_Contact_Form.html Ash
Thanks for the link. It's real close to what I need, but not exactly. To clarify, I already have the form. I just need the code for the submit button to send the text to my email box. This is the only code that link gave for the submit button. again thanks guys
the site you offered has a perfect example of what I'm trying to do. How they get that thing to work?
It has nothing to do with the submit button. You need a script to take the info and send it to your email. Then in the form tag you have the action set to the location of the script. Example: <form method="post" action="sendemail.php"> Code (markup):
hi jimsmith what code do you want to use if its php and you still need help just ask and ill help you.
Okay so you just basically need the php code. Here is one I used for my site- You just have to change it for yours. Open up notepad- save it as the name of the file- instead of text save as all file- just save it as send.php or whatever you choose .php- You will also need to tell the form you are using to use the php file- as bscdesign.com showed and a thank you page. <?PHP #This secton sends you a notification email when # the form is used // Your email address (for copies to be sent to you) $emailto=" PUT YOUR EMAIL HERE"; // Your email subject text $esubject= " PUT SUBJECT HERE"; // The email text for copies sent to you $email text=" You have a message from a visitor and it is followed: Name:".$name." Email address:".$email." Country:".$country." "; #Send the email to you @mail("$emailto", $esubject, $emailtext,"From: $email") ##This section sends to the recipients // Target page after successful submission $thankyoupage="thanks.html"; #After submission, the target URL header ("Location: $thankyoupage"); exit; ?>
how do i have the .$name. and email and country fields filled out in the email it sends to me? I have 3 text boxes, named "name" "email" "text" So far the emails have been empty except for the text from the php file
You must have a background on php in order to do this (or any languages that supports email sending). In php, here is the code: <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $name=$_REQUEST['name']; $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; $to = "jpacelajado619@gmail.com"; //Check first whether the strings meet the format of typing the email if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) { echo "Sorry! Invalid e-mail address! return to <a href="."contactus.html". ">this page</a>"; } else if($name == NULL || $email == NULL ) { echo "Please specify name and email, go back to <a href="."contactus.html".">this page</a>"; } else { //this is the correct pattern on sending the email mail($to, "Subject: $subject", $name."".$message, "From: $email" ); echo "Thank you for using our mail form"; } //$to = "$email, $from"; } else //if "email" is not filled out, display the form { echo "<b>For quick inquiries, Please enter the following information: </b>"; echo "<br /><form method='post' action='contactus.html'> <div><div>Name:</div><div><input name='name' type='text' /></div><div>Email:</div><div><input name='email' type='text' /></div> <div>Subject:</div><div><input name='subject' type='text' /></div> <div>Message:</div> <div><textarea name='message' rows='15' cols='40'> </textarea></div> <div> <input type='submit' /></div></div> </form>"; } ?> PHP:
Dear All Members, Iam looking for a form for an email subscribe as to collect the database of my visitors who subscribe all the email should come to my email address.Any help. Habibi Collection
I'm not sure there's a "form" that would do all of that for you as I think you're asking for the data to be added to your database. I do php coding and could code it for a small fee if you like.