[PHP] Wierd cookie behiavor
I have a logout page that sends this cookie setcookie("membership") So that "membership" shoud be empty. However, if you login so that the cookie membership is created, and then try to logout without restarting the browser, it wont delete the cookie. But if you restart the browser and try to logout, it will work fine any ideas? -David
[PHP] Re: Wierd Cookies
hmm, still no luck. The problem is not that the cookie in in memory, the problem is that its still on the hard drive. for example: User Logs On, User Logs off = cookie still on hd (even if you close the browser) example2: User restarts browser, User does not log on (cookie info still on hd), User logs off = works fine. any ideas? - Original Message - From: scott [gts] <[EMAIL PROTECTED]> To: php <[EMAIL PROTECTED]> Sent: Wednesday, July 11, 2001 12:39 PM Subject: RE: [PHP] Wierd cookie behiavor > if you dont specify an expiration time, the cookie > will hang around in memory until the browser is > closed... even if it's an empty cookie. (AFAIK) > > if you really want it deleted, when the user "logs out" > setcookie("membership", "", time()-1); > > that'll set the expire time to one second in the past, > which (in theory :) will delete the cookie ASAP. > > > > -Original Message- > > From: david jarvis [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 11, 2001 12:38 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Wierd cookie behiavor > > > > > > I have a logout page that sends this cookie > > > > setcookie("membership") > > > > So that "membership" shoud be empty. However, if you login so that the > > cookie membership is created, and then try to logout without restarting > > the browser, it wont delete the cookie. But if you restart the browser > > and try to logout, it will work fine > > > > any ideas? > > > > -David
[PHP] Cookie Problems with Netscape
Hi all, I have a line that deletes a previously set cookie: setcookie("membership","",time()-86400); That line works fine in IE, but doesn't delete the cookie in Netscape (both Mac and Linux). On a side note, both IE and Netscape do not pop up a warning when the cookie is being sent. Since it works in IE I guess it just doesn't warn you since its deleting a cookie not placing one, but maybe in Netscape its not working at all?
[PHP] Multiple Host's with setcookie
Hi, I was wondering if there was a way to set a cookie so that it would be accessible over multiple hosts, for instance, mail.webpage.com, forums.webpage.com, ect. I tried setting the domain to .webpage.com, but when I read the cookie it says the domain is w ww.webpage.com, thus not being accessible by mail.webpage.com. Any thoughts would be greatly appreciated.
[PHP] Hack Attempt Prevention with strip_tags()
I've been reading on php.net about the strip_tags function, and it seems that many people have been writing their own function. Is this because a malicious user could put something like Long message... or would strip_tags prevent this? What do you think of strip_tags() vs writing your own function?
[PHP] AOL messing up long links
This isn't so much PHP, but I bet it happens to lots of people. I have a PHP script which sends out an email to confirm that an email address is valid. In most cases this works fine, however, for AOL people, AOL adds a carriage return in the link, so that the variables passed in the link become broken. So, I guess what I'm saying is... does anyone now how to make a AOL friendly link?
Re: [PHP] fopen - warnings
try @fopen("categories.txt","r+"); - Original Message - From: Vanessa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 12:05 PM Subject: [PHP] fopen - warnings Hello List, this is probably a very stupid question, but I dont know how to solve this little problem: I have a script with which text files (exported access db data sheets) can be uploaded to the mysql tables. It all works fine, but very annoyingly I get warning messages, if the text file is not resident on the server. But I want it in a way that it doesnt have to be on the server...a catch. The php manual says that if the file cannot be opened fopen returns false. All nice and good working, but I get those additional warning messages. Im not sure if it has maybe something to do with the server, but I am not convinced. Ill put the code below. Any suggestions are highly appreciated (I tried die command but it somehow messed up the routine). [schnipp] $file = array ("colours.txt", "categories.txt", "stockmain.txt", "stockcolours.txt"); $i = 0; while ($file[$i]) { //öffne das textfile $datei = ""; if ($datei = fopen($file[$i], "r+")) { $zaehler = 0; //check wieviele zeilen das textfile hat //um zu verhindern, dass es leer ist! while (!feof ($datei)) //liest jede zeile einzeln mit fget() { $buffer = fgets($datei, 1000); //echo $buffer; //echo ""; $zaehler++; } //end while (!feof ($datei)) // MORE CODE AFTER THIS // . } else { ?> The file could not be opened: no Mysql insert. http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]