Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > Advice: GET vs. POST vs. SESSION
User Name
REGISTER NOW! Mark Forums Read

sponsored links

1 20th July 00:14
External User
Posts: 1
Default Advice: GET vs. POST vs. SESSION

I was hoping that some of you would be able to give me some advice.

I have started creating a web application that makes heavy use of URL GET
variables in order to solve a problem that I have had with POST in the
past - namely, having to refresh the do***ent and repost the variables when
you use the browser's back button.

So I enthusiastically have embraced GET variables, but am now having a
struggle editing the URL variable string.

So this is my question: is using URL GET variables that best way to avoid
that browser back button effect?

I have thought about using session variable extensively, but that I am going
to have to be unsetting them all over the place.

So - anyone have any advice?
Thanks in advance!
  Reply With Quote

  sponsored links

2 20th July 00:14
External User
Posts: 1
Default Advice: GET vs. POST vs. SESSION

It can be a good way, but I believe the spec for GET based parameters
only guarantee processing of 1024 characters (this may be the wrong
number but there is a limit on the guarantee).

If you are worried about unsetting them all, maybe it would help to use
a two level array to hold your form data. Perhaps the following:

$_SESSION['formName']['email'] = $_POST[['email'];

Then when you want to clear the form you can do a simple:

unset( $_SESSION['formName'] );

| InterJinn Application Framework - |
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
  Reply With Quote

  sponsored links


Thread Tools
Display Modes

Copyright 2006 - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -