You are here: Re: setting and deleting cookies « PHP Programming Language « IT news, forums, messages
Re: setting and deleting cookies

Posted by Good Man on 06/18/07 21:15

"laredotornado@zipmail.com" <laredotornado@zipmail.com> wrote in
news:1182199107.639768.126530@i13g2000prf.googlegroups.com:

> setcookie('LoggedIn', 1, time() + REMEMBER_ME_TIME, "/");
>
> 1. How do I check if this cookie is set at the top of a given PHP
> page?

Go to the next page and try to echo it... yes, the NEXT page:

<?php
$LoggedInCookie = $_COOKIE['LoggedIn'];
echo $LoggedInCookie;
?>


> 2. How do I delete this cookie?

set it again with negative time:

setcookie("LoggedIn", '', time()-42000, '/'); //erase the cookie


good luck!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация