php - Save large data-set to mySQL table from Javascript without POST?


I have a large-ish amount of server-side data that I need to store in a mySQL table. [I'm a novice, working through the learning curve of javascript & php.]

I'm thinking it's best to and send that to a PHP page to save to the database. Once the data's in a PHP array, I know how* to get it into the database; I'm just not sure what's the best way to get it there.

I can'tPOST (like this example) since the maximum length of aPOST string is 2048 characters, and I have maybe 10-20kb of data.

I'd rather not useAJAX orNode.js (like this example) for the sake of simplicity, and since this is a one-off (but both on my list to learn in the future!)

Or, would it be best to create a temp text file to the server with javascript, and then call a PHP page to load & process the data? (Although I can't find examples of how to do that without usingPOST.)

I understand the difference between server-side & client-side (thanks to this great explanation) but the size limit ofPOST seems to be my issue?

*Also I'm a little unsure as to when/how it's necessary to encode data (like with this deprecated ) for storage with {json/posting/DB tables/text}. In this case my data could contain 'single' & "double" quotes (but no foreign characters 国外 वर्ण), which [in my short experience] seem like the only times it will be an issue?


People are also looking for solutions to the problem: php - How to use widget kartik select2 with ajax & templates in yii2


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.