i need a simple submit email form with submit button on submit the email will be saved and the user passed to a new page of my site any one help please
<FORM action="http://yoursite.com/pagenamer" method="post"> <P> First name: <INPUT type="text" name="firstname"><BR> Last name: <INPUT type="text" name="lastname"><BR> email: <INPUT type="text" name="email"><BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </P> </FORM>] This is the html page where in the action tag you can mention the url of the page you want to go after the submit. Write the sql code for update.
If you want a form that sends you an email using php, here is a small script. HTML Form (same as adservermods just modified a little bit): <FORM action="email.php" method="post"> <P> <p>First name:<br /><INPUT type="text" name="firstname" /></p> <p>Last name:<br /><INPUT type="text" name="lastname" /></p> <p>Email Address:<br /><INPUT type="text" name="email" /></p> <p>Message:<br /><textarea name="message" rows="6" cols="25"></textarea></p> <INPUT type="submit" value="Send" /> <INPUT type="reset" /> </P> </FORM> HTML: PHP Form Handler (very basic with just a little bit of validation): <?php if (!empty($_POST['firstname']) && !empty($_POST['lastname']) && !empty($_POST['email']) && !empty($_POST['message']) ) { $name = $_POST['firstname'] . $_POST['lastname']; $body = "Email from: $name\n\nMessage:\n\n{$_POST['message']}"; $body = wordwrap($body, 70); // Fill in your info here... mail('youremailaddresshere', 'titleofemailhere', $body, "FROM: {$_POST['email']}"); echo '<p>We will get back to you shortly</p>'; } else { echo '<p>Please fill out the form completely.</p>'; } ?> PHP: You might want to consider using more validation. Otherwise, this simple script should work.
She wants to gather the email address prior to redirecting to new page. So do you want the emails stored in a database, flat file or simply emailed to you?