Jump to content

Archived

This topic is now archived and is closed to further replies.

perezf

Problem with Emailer

Recommended Posts

Something is going wrong with my for statement
im not sure what it is but when i send and email to my self to test it
it sends 100's but what i want it to do is jus get the number that was put into the text box
and then send that number of emails
the name of the text box is "number"

below is the php script for the emailer

<?php
$to = "$email";
$subject = "$idea";
$from_header = "From: $from";




for ($i = $number; $i >= 1 ; $i++) {
mail($to, $subject, $contents, $from_header);
}
?>

can any one help me please

Share this post


Link to post
Share on other sites
I'm about 99% sure I closed another thread like this. Emailing the same person x amount of times is nothing but a spam/joke generator and won't be tolerated on these forums. Unless you can PM me with a valid reason for a tool like this, the thread will remain closed.

EDIT: Reopened.

Unless you're using an old version of PHP, you need to use $_POST['number'] or $_GET['number']... same goes with the name, email address, etc.

Also, your for loop is setup backwards. The middle term needs to be <=, it's a conditional statement that says keep going until it reaches x.

Share this post


Link to post
Share on other sites
[!--quoteo(post=376059:date=May 22 2006, 11:36 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 22 2006, 11:36 AM) [snapback]376059[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm about 99% sure I closed another thread like this. Emailing the same person x amount of times is nothing but a spam/joke generator and won't be tolerated on these forums. Unless you can PM me with a valid reason for a tool like this, the thread will remain closed.

EDIT: Reopened.

Unless you're using an old version of PHP, you need to use $_POST['number'] or $_GET['number']... same goes with the name, email address, etc.

Also, your for loop is setup backwards. The middle term needs to be <=, it's a conditional statement that says keep going until it reaches x.
[/quote]

Thank you very much

Share this post


Link to post
Share on other sites

×

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.