Re: [PHP] Refresh PHP

This is a discussion on Re: [PHP] Refresh PHP within the PHP General forums, part of the PHP Programming Forums category; Hello Ralph, Actually, after calling session_destroy() I reset those variables assigning an empty value like you said. But it still ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-08-2003
Mauricio
 
Posts: n/a
Default Re: [PHP] Refresh PHP

Hello Ralph,

Actually, after calling session_destroy() I reset those variables assigning
an empty value like you said. But it still doesn't work. I did a test after
destroying session variables, printing them. They are empty.

Another weird thing is that when a login as "joao" them logoff, exclude IE
cache, going in Tools >> Internet Option..., and login again with another
user, this way the variable are printed correctly.

It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and Netscape
7.



----- Original Message -----
From: "Ralph Guzman" <ralph@nqionline.com>
To: "'Mauricio'" <mauricio@agp5.com.br>
Sent: Tuesday, July 08, 2003 2:11 PM
Subject: RE: [php] Refresh PHP


> Rather than using session_destroy() reset the session variable by
> assigning it an empty value. For example, lets say your url looks
> something like this:
>
> http://www.mydomain.com/?url_variable=Mauricio
>
> then do the following:
>
> if($_GET['url_variable'] != $url_variable){
> $url_variable = "";
> session_register('url_variable')
> }
>
>
> -----Original Message-----
> From: Mauricio [mailto:mauricio@agp5.com.br]
> Sent: Tuesday, July 08, 2003 7:02 AM
> To: PHP
> Subject: [php] Refresh PHP
>
> Hi people!
>
> Did anyone get this situation?
>
> I'm creating a Site that uses 3 session variables. One of them I always
> print at the top of the page, it's the name of the user. There is a link
> that calls the function session_destroy(). Everytime that I follow this
> link
> and log in with another user, that session variable printed doesn't
> change,
> but if I press F5 in IE or Netscape them it brings the right user. I
> can't
> make the page return the current user login, it always came with the
> last
> user logged. I tried to add some headers to set no cache in all php
> pages,
> but it doesn't work.
>
> Anyone can help me???
>
> Thanks
>
> PS: Sorry about my poor english...
>
>
> Maurício Valente
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



Reply With Quote
  #2 (permalink)  
Old 07-08-2003
Ralph Guzman
 
Posts: n/a
Default RE: [PHP] Refresh PHP

How about:

if($_GET['url_variable'] != $url_variable){
$url_variable = $_GET['url_variable'];
session_register('url_variable')
}


-----Original Message-----
From: Mauricio [mailto:mauricio@agp5.com.br]
Sent: Tuesday, July 08, 2003 11:14 AM
To: PHP
Subject: Re: [php] Refresh PHP

Hello Ralph,

Actually, after calling session_destroy() I reset those variables
assigning
an empty value like you said. But it still doesn't work. I did a test
after
destroying session variables, printing them. They are empty.

Another weird thing is that when a login as "joao" them logoff, exclude
IE
cache, going in Tools >> Internet Option..., and login again with
another
user, this way the variable are printed correctly.

It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and
Netscape
7.



----- Original Message -----
From: "Ralph Guzman" <ralph@nqionline.com>
To: "'Mauricio'" <mauricio@agp5.com.br>
Sent: Tuesday, July 08, 2003 2:11 PM
Subject: RE: [php] Refresh PHP


> Rather than using session_destroy() reset the session variable by
> assigning it an empty value. For example, lets say your url looks
> something like this:
>
> http://www.mydomain.com/?url_variable=Mauricio
>
> then do the following:
>
> if($_GET['url_variable'] != $url_variable){
> $url_variable = "";
> session_register('url_variable')
> }
>
>
> -----Original Message-----
> From: Mauricio [mailto:mauricio@agp5.com.br]
> Sent: Tuesday, July 08, 2003 7:02 AM
> To: PHP
> Subject: [php] Refresh PHP
>
> Hi people!
>
> Did anyone get this situation?
>
> I'm creating a Site that uses 3 session variables. One of them I

always
> print at the top of the page, it's the name of the user. There is a

link
> that calls the function session_destroy(). Everytime that I follow

this
> link
> and log in with another user, that session variable printed doesn't
> change,
> but if I press F5 in IE or Netscape them it brings the right user. I
> can't
> make the page return the current user login, it always came with the
> last
> user logged. I tried to add some headers to set no cache in all php
> pages,
> but it doesn't work.
>
> Anyone can help me???
>
> Thanks
>
> PS: Sorry about my poor english...
>
>
> Maurício Valente
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply With Quote
  #3 (permalink)  
Old 07-08-2003
Mauricio
 
Posts: n/a
Default Re: [PHP] Refresh PHP

Doing this, it works. The variable 'url_variable' is changed when it pass
over the if. But I don't want to use a get variable, it could be easily
changed by the users... its my problem...

Maurício Valente

----- Original Message -----
From: "Ralph Guzman" <ralph@nqionline.com>
To: "'Mauricio'" <mauricio@agp5.com.br>; "'PHP'" <php-general@lists.php.net>
Sent: Tuesday, July 08, 2003 4:05 PM
Subject: RE: [php] Refresh PHP


> How about:
>
> if($_GET['url_variable'] != $url_variable){
> $url_variable = $_GET['url_variable'];
> session_register('url_variable')
> }
>
>
> -----Original Message-----
> From: Mauricio [mailto:mauricio@agp5.com.br]
> Sent: Tuesday, July 08, 2003 11:14 AM
> To: PHP
> Subject: Re: [php] Refresh PHP
>
> Hello Ralph,
>
> Actually, after calling session_destroy() I reset those variables
> assigning
> an empty value like you said. But it still doesn't work. I did a test
> after
> destroying session variables, printing them. They are empty.
>
> Another weird thing is that when a login as "joao" them logoff, exclude
> IE
> cache, going in Tools >> Internet Option..., and login again with
> another
> user, this way the variable are printed correctly.
>
> It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and
> Netscape
> 7.
>
>
>
> ----- Original Message -----
> From: "Ralph Guzman" <ralph@nqionline.com>
> To: "'Mauricio'" <mauricio@agp5.com.br>
> Sent: Tuesday, July 08, 2003 2:11 PM
> Subject: RE: [php] Refresh PHP
>
>
> > Rather than using session_destroy() reset the session variable by
> > assigning it an empty value. For example, lets say your url looks
> > something like this:
> >
> > http://www.mydomain.com/?url_variable=Mauricio
> >
> > then do the following:
> >
> > if($_GET['url_variable'] != $url_variable){
> > $url_variable = "";
> > session_register('url_variable')
> > }
> >
> >
> > -----Original Message-----
> > From: Mauricio [mailto:mauricio@agp5.com.br]
> > Sent: Tuesday, July 08, 2003 7:02 AM
> > To: PHP
> > Subject: [php] Refresh PHP
> >
> > Hi people!
> >
> > Did anyone get this situation?
> >
> > I'm creating a Site that uses 3 session variables. One of them I

> always
> > print at the top of the page, it's the name of the user. There is a

> link
> > that calls the function session_destroy(). Everytime that I follow

> this
> > link
> > and log in with another user, that session variable printed doesn't
> > change,
> > but if I press F5 in IE or Netscape them it brings the right user. I
> > can't
> > make the page return the current user login, it always came with the
> > last
> > user logged. I tried to add some headers to set no cache in all php
> > pages,
> > but it doesn't work.
> >
> > Anyone can help me???
> >
> > Thanks
> >
> > PS: Sorry about my poor english...
> >
> >
> > Maurício Valente
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >

>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:58 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0