in reply to Executing a Script to Completion

So, if there is a form that allows a user to fill in any number of rows (location, number) for some given surname, and that form contains a "Submit" button, the result of hitting that button could be to save the form contents to a local file on the server (possibly after doing some rudimentary sanity checks on field values), making sure the format of this file is suitbla for use with the "mysqlimport" utility (which does the same thing as doing "load data local infile" within a mysql session); once the file is successfully closed, just run mysqlimport via "system()", and check the results to see if that worked. The next form simply reports the result (success or failure, possibly with details).

Naturally, be mindful of the information in the mysql docs regarding security issues and access control with respect to the use of the "load data infile"/"mysqlimport" mechanism.