Hello folks,
I'm somewhat new to PHP - and the extent of my experience with it basically falls into the enter data, submit data, input into MySQL...
However, I'm -hoping- that what I'm wishing to accomplish can in fact be accomplished with PHP.
It basically deals with both .txt and .csv files. I'm wanting to have the end user upload their own .txt or .csv file and then have the script take over by doing the following:
Parse/search their uploaded file and change the name(s) of their field names to match my desired field names.
For instance: My field names would be: lname, fname, address, city, state, zip
Their field names might be last_name (or last, or lastname, or anything), first_name, addy, their_city, their_state, etc, etc, etc.
The predicament is not knowing WHAT their field names are - and if their are extranious fields.
Is there anyway to paruse their uploaded file, parse/search their fields, rename them to my field names... and delete any of the unwanted fields? After that, save the new file with their default extension (either .txt or .csv) and have it downloaded to their 'puter.
I certainly hope I explained myself well enough... but if I didn't, by all means let me know. This is my first post here, so I guess I'm a tad nervous about the "newbie" stigma that will be attached. 🙂