Mark2000 Posted January 6, 2011 Share Posted January 6, 2011 Hello there. I'm a designer and not really a coder, but I do my best. I'm trying to set up a mailer form that will collect email addresses for a newsletter and send them into my inbox in the body of a message. I've managed to create just that, but I need some other functionality that I haven't been able to accomplish. The work is for a non-profit site on Net Neutrality. http://internetyouneed.com/. You can see the form under the navigation menu. I sends the addresses to me just fine, but it also takes you to a blank page after. The form in nested inside a css div with an image background. I'd love two things: One, something that secures the form a bit so that only email addresses get sent and not random junk. I'd also like it if, instead of trying to go to another page after being clicked, it would stay on the same page and delete the form and changed the div's background image (say, a thank you image). Is this possible? Sorry, I'm so clueless, I was able to pull this off in Flash, but in HTML I'm baffled. This is my PHP script so far <?php mail("[email protected]", $_POST['subject'], $_POST['body'], "From: PHPMailer\nReply-To:". $_POST['from']."\nX-Mailer: PHP/" . phpversion()); ?> And here is the form with the CSS div#signup { position:absolute; background: url(images/signup.gif) no-repeat; left: -144px; top: 440px; width: 227px; height: 137px; } div.link03 { position: absolute; top: 75px; left: 45px; width: 126px; height: 61px; } <div align="center" id="signup"><form action="mail.php" method="post"><br /><br /><input name="BODY" type="text" value="Enter Your Email" size="20" maxlength="60" /> <div class="link03"><input type="image" name="submit" src="images/spacer.gif" width=125 height=59 border="0" /></div></form></div> Quote Link to comment https://forums.phpfreaks.com/topic/223588-need-help-with-email-form/ Share on other sites More sharing options...
Rifts Posted January 6, 2011 Share Posted January 6, 2011 you need to follow the correct format this will help you http://www.htmlite.com/php029.php Quote Link to comment https://forums.phpfreaks.com/topic/223588-need-help-with-email-form/#findComment-1155821 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.