Re: How to keep $_POST value when I have 3 submit options?
| From: | Christoph Becker | Date: | Thu, 23 Oct 2014 23:03:55 +0000 |
| Subject: | Re: How to keep $_POST value when I have 3 submit options? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323991@lists.php.net to get a copy of this message | ||
Negin Nickparsa wrote:
> On Thu, Oct 23, 2014 at 11:01 AM, Jeffry Killen <jekillen@prodigy.net>
> wrote:
>
>> You may also want to save the view preference as a session variable
>> or have code write a preference file for the user.
>> Is the user required to have an account? If so, include a variable that
>> designates the default view preference.
>>
>> using get method can be a way to achieve it however I prefer to use post
>> method.
However, POST is not the right method in this case, see
<http://tools.ietf.org/html/rfc2616#section-9.1>.
> can you give me hints about ajax parts? maybe I can do something with that.
> for session they are so strict not using session for the sake of speed and
> security.
Instead of a session, you could use a cookie or the browser's local
storage (the latter only, if you do not need to support old browsers).
--
Christoph M. Becker