worpx
asked on
php: read text out of the row/column and put it into mysql
Hello,
Currently, I have a php file that reads a .csv file and puts the text thats in there on a html page in a table, row by row. First and second columns are text from the file, the third and fourth are inputs from the user. The third column is just textarea boxes and the fourth is an option group with a yes or no value. How do I read the text in column 1 2 and 4 that are being submitted row by row into a mysql table?
I have already experimented with creating a table..etc (so its already in there). I can read the value of the text area boxes into the table fine. The things that are missing are column 1, 2, and 4, which are text from the file on the page (1 and 2) and 4 is the optgroup value.
Any help is appreciated!
Currently, I have a php file that reads a .csv file and puts the text thats in there on a html page in a table, row by row. First and second columns are text from the file, the third and fourth are inputs from the user. The third column is just textarea boxes and the fourth is an option group with a yes or no value. How do I read the text in column 1 2 and 4 that are being submitted row by row into a mysql table?
I have already experimented with creating a table..etc (so its already in there). I can read the value of the text area boxes into the table fine. The things that are missing are column 1, 2, and 4, which are text from the file on the page (1 and 2) and 4 is the optgroup value.
Any help is appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mysql will not blow up unless you have terrabytes of data in these forms.
depending on your security requirements each may be more efficient.
you can put data into a form by having an input with type = "hidden"
I'd reccomend option 2 for the fastest and most secure option - using $_SESSION[] to save your data
depending on your security requirements each may be more efficient.
you can put data into a form by having an input with type = "hidden"
I'd reccomend option 2 for the fastest and most secure option - using $_SESSION[] to save your data
ASKER
I don't mean to keep being so inquisitive, but would you happen to have any good examples of this $SESSION[] in use?
Thanks
Thanks
ASKER
i'll give it a try; thanks a lot!
Glad I could help you
ASKER
Thank you for getting back to me so quickly. Can you explain a little more on what you mean by "1. Put these values in hidden values on your form- so you can read them back in when submitted" and "4. Save these values in a database table, and storing the primary key of these in any of the above methods, so when it comes to saving you can link to this primary key".
Which would be the easiest to implement and most efficient?
Also, in mysql tables, lets say I am storing these forms and there are going to be 4 per day. Do I store everything in 1 table, appending all the forms or multiple tables for all the different forms. I don't know if mysql will blow up when a certain point is reached.