|
Author |
Message |
Iyonix
WebHelper
![WebHelper WebHelper](images/rank_2.gif)
![](images/avatars/gallery/computers/risc_os_cogwheels_small.gif)
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Sat Feb 14, 2004 10:25 pm (20 years, 4 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
I can login to my script fine with this
Code: | setcookie("user",$userc,time()+99999, "/"); // Set cookies
setcookie("pass",$fpass,time()+99999, "/");
|
but the logout won't logout with this
Code: |
setcookie("user"," ",time()-3600,"/"); // Delete cookies
setcookie("pass"," ",time()-3600,"/");
|
|
________________________________ Iyonix |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Iyonix Find all posts by Iyonix](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
OllieMaitland
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 06 Dec 2003
Posts: 25
|
Posted:
Sun Feb 15, 2004 10:44 pm (20 years, 4 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
The cookie will only set the cookie on loading the page...hence when building the page the values of the cookies are still as they were from the previous page... to make the cookie unset for the loading of the logout page you could use:
Code: |
setcookie("user","",time()-3600,"/"); // notice no space
unset($_COOKIE['user']);
setcookie("pass","",time()-3600,"/");
unset($_COOKIE['pass']);
|
or you could use:
Code: |
setcookie("user","",time()-3600,"/"); // notice no space
$_COOKIE['user']="";
setcookie("pass","",time()-3600,"/");
$_COOKIE['pass']="";
|
...i don't know whicj would be considered better coding ;o |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by OllieMaitland Find all posts by OllieMaitland](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Send email Send email](templates/4WebHelp2/images/lang_english/icon_email.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Feb 16, 2004 9:01 am (20 years, 4 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
OllieMaitland wrote: | ...i don't know whicj would be considered better coding ;o |
I would say the first one, but I don't know why ![Smile](/forums/images/smilies/icon_smile.gif) |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Marinamus
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 30 Nov 2014
Posts: 5
Location: USA
|
Posted:
Sun Dec 07, 2014 8:58 pm (9 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
ok i have figured out the problem with this and the problem was how i done the datapath.cs
instead of doing like this
Code: |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Marinamus Find all posts by Marinamus](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Send email Send email](templates/4WebHelp2/images/lang_english/icon_email.gif) ![ICQ Number ICQ Number](templates/4WebHelp2/images/lang_english/icon_icq_add.gif) |
![](images/spacer.gif) |
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.175394 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |