Jump to content

Need help with email form


Mark2000

Recommended Posts

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("news@badmonkeystudios.com", $_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>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.