I have code that does these things:
-Asks for input via a form
-Adds data to a temp table in the database
-Asks for file via a form
-Adds file to a temp folder with a temp name
After user agrees file and text entered is what they want it then:
-Copies file to a new name in a new folder
-Copies data from the temp table in the database to a permanent one
This all works fine but I want error checking just incase the database fails etc. For instance if the database server crashes partway through their upload I would like it to give the error, stop where it's at, then go back to the start of the process again (or an error report page even better).
The same with the natural progession. id:
-If database DIDN'T fail, move on to next step etc
-else go to error report page.
Things like that. Are there built in php or mysql error handling that I can use, is there some other industry standard way to do this perhaps?
Thanks so much for any help or advice you might have
Rob