You are here: cookies and session variables « PHP Programming Language « IT news, forums, messages
cookies and session variables

Posted by Japhy on 11/24/05 20:33

Hello,
I need to save values typed into forms across several scripts, before
the user actually 'submits' the form to update the mysql db.

I have been exploring ways to do this, and looking for some guidance as
to whether to use
cookies or PHP session variables.

Should my use of either be conservative due to performance reasons?
What are the advantages of either?

To briefly describe what I am trying to do:
I have 3 forms : formA, formB and formC
each has about 15 entry fields (from the same mysql table).
formA has fieldA1, fieldA2, etc
formB has fieldB1, fieldB2, etc
formC has fieldC1, fieldC2, etc

The user can navigate from formA to formB, etc with a button click.


Right now, I am populating each form from the mysql db value. But I
need to save values typed in while the user navigates from page to
page. Eventually, the user submits and I update the db from all forms.
The easiest way for me to incorporate this into my existing logic is
to, before going into formA, set a cookie (or session variable) for
each field. If they go to formA and change a value, reset the cookie
(I am doing this with an onblur call to javascript function.) Seems
inefficient for me to set a cookie for every field...they may only
change 1 field...or none.
But I am having trouble grasping any other way to do it....Thus, my
question about efficiencies, performance, etc.
Thanks for any advice!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация