PHP Form Cookie Question [message #170093] |
Sun, 10 October 2010 02:25 |
jcage(at)lycos(dot)com
Messages: 2 Registered: October 2010
Karma: 0
|
Junior Member |
|
|
Hello,
I have one form where a query is run based on the word placed into a
text box. The operator enters their name for example, on one form and
the query shows up on a second page. I'm using PHP, MySQL and Apache
and want the user to be able to click their browser back button and
not have to continuously re-enter their query word in the text box. I
know that some browsers allow this type of activity but in this case
and using Internet Explorer, that's not an option so...
Are there any good cookie scripts that will allow for this? Or is
there a better way of handling it?
TIA
|
|
|
Re: PHP Form Cookie Question [message #170094 is a reply to message #170093] |
Sun, 10 October 2010 02:32 |
jcage(at)lycos(dot)com
Messages: 2 Registered: October 2010
Karma: 0
|
Junior Member |
|
|
On Oct 9, 7:25Â pm, "jc...@lycos.com" <jc...@lycos.com> wrote:
> Hello,
>
> I have one form where a query is run based on the word placed into a
> text box. Â The operator enters their name for example, on one form and
> the query shows up on a second page. Â I'm using PHP, MySQL and Apache
> and want the user to be able to click their browser back button and
> not have to continuously re-enter their query word in the text box. Â I
> know that some browsers allow this type of activity but in this case
> and using Internet Explorer, that's not an option so...
>
> Are there any good cookie scripts that will allow for this? Â Or is
> there a better way of handling it?
>
> TIA
I should mention too that my hope is, to find a cookie solution that
last for that single browser session only. thanks
|
|
|
Re: PHP Form Cookie Question [message #170095 is a reply to message #170093] |
Sun, 10 October 2010 02:32 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 10/9/2010 10:25 PM, jcage(at)lycos(dot)com wrote:
> Hello,
>
> I have one form where a query is run based on the word placed into a
> text box. The operator enters their name for example, on one form and
> the query shows up on a second page. I'm using PHP, MySQL and Apache
> and want the user to be able to click their browser back button and
> not have to continuously re-enter their query word in the text box. I
> know that some browsers allow this type of activity but in this case
> and using Internet Explorer, that's not an option so...
>
> Are there any good cookie scripts that will allow for this? Or is
> there a better way of handling it?
>
> TIA
What is a "cookie script"?
But no, you cannot do this reliably in PHP because when the user hits
the "back button", the browser may pull the page from its cache, and not
even go to the server. So no PHP code will ever be run.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: PHP Form Cookie Question [message #170096 is a reply to message #170094] |
Sun, 10 October 2010 02:38 |
Michael Vilain
Messages: 88 Registered: September 2010
Karma: 0
|
Member |
|
|
In article
<bb1ce211-d5a3-43f6-8797-76a05e3ec73f(at)n16g2000vbg(dot)googlegroups(dot)com>,
"jcage(at)lycos(dot)com" <jcage(at)lycos(dot)com> wrote:
> On Oct 9, 7:25 pm, "jc...@lycos.com" <jc...@lycos.com> wrote:
>> Hello,
>>
>> I have one form where a query is run based on the word placed into a
>> text box. The operator enters their name for example, on one form and
>> the query shows up on a second page. I'm using PHP, MySQL and Apache
>> and want the user to be able to click their browser back button and
>> not have to continuously re-enter their query word in the text box. I
>> know that some browsers allow this type of activity but in this case
>> and using Internet Explorer, that's not an option so...
>>
>> Are there any good cookie scripts that will allow for this? Or is
>> there a better way of handling it?
>>
>> TIA
>
> I should mention too that my hope is, to find a cookie solution that
> last for that single browser session only. thanks
Use a JASON form where JAVASCRIPT is used with hidden fields. It will
break with people that disable JAVASCRIPT, so you'll have to decide if
your sub-optimal solution is "better" or having everything on one form
is an easier user experience. BTW, this isn't a php issue. It's
strictly a browser-based UI issue requiring HTML/JAVASCRIPT.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
|
|
|
Re: PHP Form Cookie Question [message #170098 is a reply to message #170094] |
Sun, 10 October 2010 09:09 |
Geoff Berrow
Messages: 16 Registered: September 2010
Karma: 0
|
Junior Member |
|
|
On Sat, 9 Oct 2010 19:32:07 -0700 (PDT), "jcage(at)lycos(dot)com"
<jcage(at)lycos(dot)com> wrote:
> On Oct 9, 7:25Â pm, "jc...@lycos.com" <jc...@lycos.com> wrote:
>> Hello,
>>
>> I have one form where a query is run based on the word placed into a
>> text box. Â The operator enters their name for example, on one form and
>> the query shows up on a second page. Â I'm using PHP, MySQL and Apache
>> and want the user to be able to click their browser back button and
>> not have to continuously re-enter their query word in the text box. Â I
>> know that some browsers allow this type of activity but in this case
>> and using Internet Explorer, that's not an option so...
>>
>> Are there any good cookie scripts that will allow for this? Â Or is
>> there a better way of handling it?
>>
>> TIA
>
> I should mention too that my hope is, to find a cookie solution that
> last for that single browser session only. thanks
You should be able to implement a solution using session variables.
--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker
|
|
|