Sessions and Forms
Posted 28 July 2006 - 05:30 PM
I just got a general question...
I have a form that will have many display lists that you add/remove to using <input type="button">
I want to be able to populate many fields with potentionally many resubmits to the same form as information gets added/removed.
Finally once everything is set up the way one might want, they can hit the big save button at the bottom which will process all the information they entered and insert it into the database.
Now, generally a normal form only consists of Step 2.... do your error checking; if all is good, then preform the DB insert.
But the form i need to build will have many little [add] buttons everywhere that will keep small amounts of information to a table (i will store as an array).
I was thinking.... would it be safe/ok to just save everything to $_SESSION. And when the final Save is pressed, i just parse through the $_SESSION and preform my inserts?
Here is a sample of a form i did up quickly in an image editor of what i intend to make:
Posted 28 July 2006 - 05:54 PM
1. it can delete your sessions before you are even finished with what you are doing.
2. if it's set too high it can make it to where if there is a lot of time left over after you close the browser someone could hijack the sessiona nd finish doing what you started, or work on what you were working on, leaving it to default makes it clear as soon as you close the browser. Other than that it should be safe.
Business Website: http://www.infotechnologist.biz
Personal Website: http://www.joyelpuryear.com
Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users