I' about to build a calculator using Javascript and PHP and im just wondering what the best option would be to store the data. The calculator will be silmilar to htt开发者_Python百科p://psdtowp.com/order-now.
I was originally going post all values in a POST method and then store them in the database for later use, would this be viable or is there a better method?
Ahh brilliant, it only needs to be stored for a short while until the user fills out the next page where all corresponding info would be stored in a database...
Thanks
I think for your purposes storing them in a $_SESSION
/cookie variable would be fine.
In MySQL seems to be overkill and too complicated.
How long do you need to store it for? If indeed just for a single use, go with @ultimatebuster suggestion and use $_SESSION. If you need to access it later, consider either a database solution or even writing to a text file.
精彩评论