Hey!

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?