I'm fairly new to php, and I wanted to create a form where if they pressed a button, a loop would start, and it would only stop when they either exited the page, or hit a stop button. I'm not sure how to go about doing this, any advice/help?

Would that continue to send the email until someone hits stop? If so, at what delay? If not, how can I make it do that?

03-21-2013, 09:29 AM

bigzee

I mean would it continue to echo the variable?

03-21-2013, 09:35 AM

ssdog

Yes, it sends until someone stops it, but be carefull: IF YOU CLOSE THE BROWSER, YOU DON'T STOP THE PROCESS
As about delays, it doesn't have any delay...send the email, then runs the process again.
If you want to add a delay, you can put the script to sleep by doing this: