0

I want to make small script of php. And i have two buttons with name "PAUSE" and "RESUME" when i click on pause the script will be paused until i click on "RESUME".When i click on resume the script will be start at the point where it is stopped not from beginning. Thanks in advance

Shilpa
  • 1
  • 2
    What functionality do you want to achieve? – Lalit Sep 11 '17 at 08:54
  • 1
    Leaving php in a hanged state is a terrible idea. You're best off using a [switch](http://php.net/manual/en/control-structures.switch.php) statement with `$_POST` and determining what to do when you send the request. – IsThisJavascript Sep 11 '17 at 08:57
  • 1
    php is synchronous, you can't pause it. but there is a way you can achieve this if you have something like a data to loop on when you wan't to resume it. create an array in js or a database, then pass the values from js to php back and fort – Semi-Friends Sep 11 '17 at 08:57
  • I just want to pause php script for some time and then start again.Actually i have database with 12lac records and i want to fetch data and it take too much time so i want to pause php script for some time – Shilpa Sep 11 '17 at 09:25
  • Read this carefully .. https://www.sitepoint.com/community/t/pause-resume-script/2577/2 – Mittul At TechnoBrave Sep 11 '17 at 09:33
  • https://stackoverflow.com/questions/333664/how-do-i-implement-basic-long-polling – mplungjan Sep 11 '17 at 11:31

0 Answers0