last day (24 days later) » 

5:20 PM
1
Q: Implement Mutiple Clients Checklists

NoobDEV-GBLI have a list of clients and several checklists for each one of them I have a table set to pm1, pm2, pm3, ..., pm118 for all points in all checklists. However, as I have several clients with different checklists, I'm not sure how to do the implementation, anyone have any idea how this should be ...

 
Could you provide an example of what is inside 001.php, 002.php, and so on? It may be possible to write just one 'cliente.php' file that uses the $cliente variable inside it. You should also consider using a database or some kind of data structure saved to a file if you intend to support hundreds of clients.
 
@Romen hello, i have made Edit to add some code exemple as you ask
 
Great, so are the tables in each of these files is specific to each client? Suppose you had a spreadsheet with a row for every client, could you use columns for each client row in the spreadsheet to represent which checklist items each client should see? If the answer is yes then you should consider storing this information about the clients in a database instead of inside the code itself. Even a spreadsheet or csv file could be used. It just depends on your requirements.
 
all tables are like that for each client(hard code for fast implementation) and yes is specific to each client, but now i whant to do that more dynamic...if i make a table using [client name , pm] how i create the tables and how do i save that information on sql
 
If you can represent the checklist for each client in a spreadsheet then it should be straightforward to create an SQL table based on that spreadsheet. I don't know what all of the possible items of your checklists could be so this is something you have to figure out. If there are a finite number of possible checklist items then a column with a YES/NO (boolean) value for each possible item could work. If the checklists could contain anything then you may need to use multiple tables to model those checklists. Trying to make it into a spreadsheet will tell you quicker than trying with SQL will.
 
5:20 PM
@Romen i know that is ok on exel, but we whant that in web...can we make chat about that?
the question is that I have a table with the client and PM in a table in the database, okay I load this to an array to be able to loop and create the required fields, but then when I insert into the database How do I do this?
do you understand my question?
 
5:53 PM
I've never used the chat before. Cool.
I don't clearly understand your question. What are you inserting into the database? The client's selections on each row?
 
6:07 PM
I think I understand now. First you need to set up either a form to submit or an ajax POST request in the client page. The form data or ajax POST body can contain an array that you get from reading the options in your table using client-side javascript. Does that make sense so far? The next step is to make a PHP script to receive the ajax request or form data and parse the request body back into a proper php array so you can loop over it.
 

  last day (24 days later) »