You are here: Re: Passing variables « PHP Programming Language « IT news, forums, messages
Re: Passing variables

Posted by fletch on 04/13/06 09:44

Personally I would have all this on one page. There is a lot of
duplication involved.

To do it your way you need to pass variables between pages. There are a
number of ways to do this.

1) Session
2) Get str
3) Cookie.

Session - good for large amount of data, and stored on server.
Get - good for limited amount of data, if the string makes sense by
itself then the page can be bookmarked,
Cookie - I think you may as well use a session but they do occasionally
have their uses.

We also find putting a timestamp on form posts and values to be useful.
What happens if the same user sends a form twice, by going back in the
browser or pressing refresh? Do they get registered twice. Store the
form in the session using the timestamp created in a hidden field in
the form. Check the timestamps as they come in, and the form name
against previous forms to do an array_equals(). If you find you've got
exactly the same thing then you have a duplicate post, if not then you
have to process the form as normal.

 

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

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