0

I'll start by stating the overall goal of what I am trying to achieve:

Our company manages an online product/service which gives millions (theoretical) of people access to certain information. We maintain and online portal in which members can enroll themselves individually and all of their information is stored in various MySQL Tables and AES encrypted in some instances using PHP.

In some cases, we may have a sub-manager who owns a group of 10+ individuals he/she wants to put in the system but does not want to manage one at a time. This sub-manager is able to upload a csv or excel file (with specific field names) and in turn allow something in our system to process that information and place into the specific fields. Additionally, if any of the fields in the file submitted contains an error, the error is logged and the file continues to process without issue until the uploaded file is complete.

Once the file is processed, an detailed log is sent to the sub-manager with the number of additions to his/her account as well as any issues that may have come up during the file upload. Similarly, the sub-manager is able to send a file of 'terminations' which our system must be able to process and effectively terminate a member's coverage.

I am familiar with uploading files with PHP but the rest is foreign to me. Has anybody had experience in such a system? My initial thought is to call this a 'user management system' but am not sure I am using the correct terminology in this case. Is there a preferred method to go about it?

Any suggestions are greatly appreciated.

Our system is built on a LAMP stack for reference.

Note: I am not concerned with building a login or member priviledge system. I am familiar with that - more concerned with the file upload and processing perspective of a large client who may submit 100+ members at a single time with sensitive information contained in the .xls or .csv file.

JM4
  • 6,740
  • 18
  • 77
  • 125

1 Answers1

0

Just create a file format they must follow when they upload the file:

fname,lname,username,password

Then when they upload the file, you batch process the file line at a time.

Process each line through the same "add user" functionality you would use when the system is adding a single account.

Report all of the results back to the user using the same file they sent with the information appended to the end of each row:

fname,lname,username,password,ADDED
fname,lname,username,password,ADDED
fname,lname,username,password,ERROR,Duplicate Record
etc.
Chuck Burgess
  • 11,600
  • 5
  • 41
  • 74
  • I suppose the 'reading of the file line by line' is what I am unfamiliar with, especially appending results of the upload to the existing file. – JM4 May 17 '11 at 17:57
  • not to be rude but essentially you detailed exactly what my original post was about. Here is what I'm trying to do, how might I get started on it? – JM4 May 17 '11 at 18:05
  • I think what you are asking my too broad then. If you know how to upload a file in PHP, then reading it line-by-line should be easy. Just check out PHP.net for reading files line-by-line. I guess I am confused as to what you are `really` after. – Chuck Burgess May 17 '11 at 19:36