Re: Infinite Loop?
| From: | Tony S. Wu | Date: | Sat, 02 Nov 2002 20:38:49 +0000 |
| Subject: | Re: Infinite Loop? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22919@lists.php.net to get a copy of this message | ||
I've seen no way to get out of the while loop.
Tony S. Wu
tony@universalmac.com
"Nope, this world ain't perfect. But at least I know it's not because of
me."
Graeme McLaren at mickel@ntlworld.com wrote:
> Greetings list members. I've written the code below as part of an
> automatic email script. The problem with this is it seems to run in to
> an infinite loop. The for loop seems to get completely ignored by
> emails get sent constantly. I deleted the script after receiving 2500
> emails ! :'(
>
> Can anyone point out what the problem with this is?
>
> while($tmp <= $NowUnix)
> {
>
> for($i=0; $i<=2; $i++)
> {
> $sendto = "someone@somewhere.com";
> $subject = "Test Automatic Email";
> $message = "If you get this then age3.php works"
> $message = "If you get this then age3.php works"
> $message = "If you get this then age3.php works";
>
> mail($sendto, $subject, $message);
> }
> }
>
> Cheers,
>
> Graeme :)