How to set up an automatic queuing system to run multiple items one after another? I don’t want them to be sent immediately, or this could break my backend PHP script.
Here is a simple example, assuming that each form can submit independently, and the master submit will run all forms in the series.
<input type="submit" id="submit_all" value="Submit All" /> <form id="form-1" method="post" action="function.php"> <input type="text" name="foo" value="Foo" /> <input type="submit" value="Submit" /> </form> <form id="form-2" method="post" action="function.php"> <input type="text" name="foo" value="Foo" /> <input type="submit" value="Submit" /> </form> <form id="form-3" method="post" action="function.php"> <input type="text" name="foo" value="Foo" /> <input type="submit" value="Submit" /> </form>
UPDATE:
script I am working on a tool to back up FTP files and dump MySQL from multiple websites - essentially an automated backup tool for web administrators.
Each form contains values for connecting to FTP and MySQL of each site, and the PHP function copies and stores files locally and creates a MySQL dump.
Copying files can take 20+ minutes to the site, so the idea is to create a “main button” to automate each backup one by one.
source share