I have a website which works with PHP on the server side.
Users access pages and PHP does some calculations, writes data to a MySQL database etc.
Imagine a user accesses a page where PHP creates an account for the user. The creation consists of two parts: inserting the registration data into the table "users" and inserting settings for this account into the table "settings". These are two SQL queries which have to be executed one after another. If the user quits the page after the first query, there aren't any values inserted into "settings".
How could I avoid this issue? I think simply by using ignore_user_abort(true), right?
So isn't it useful to call ignore_user_abort(true) on the top of every PHP script? I don't know any cases where it should cause problems.