Re: please explane cookies.



Just make a cookie with the same name and the orginal should be
overwritten.
Frits van Leeuwen wrote:
Hello,
I try to understand cookies.
This is what I have and it's working.

INDEX.PHP
-------------
<?php
setcookie("LeeuwendeelTaal","--",time()+31536000);
?>
<html>
<body>
<?php
if (isset($_COOKIE["LeeuwendeelTaal"]))
{
// here a case for NL or EN
print_r($_COOKIE);
echo "<br />Taalcode = " . $_COOKIE["LeeuwendeelTaal"] . "!<br />";
}
else
{
// Here I like to chooce the language
echo "Chooce your language<br />";
}
?>
test3<BR>
</body>
</html>

But....
I do not understand how more now.
When I start INDEX.PHP, I set a cookie. When it is already there, I
overwrite it. But I only like to use the cookie. And when I like, I like to
change the file.

.



Relevant Pages

  • Re: How does Response.Cookies really work with keys?
    ... > rather than overwrite it? ... The cookie values can obviously be merged with any other values you like. ... But if you want to store those merged values in a cookie on the client, ... If your question is worth asking, ...
    (microsoft.public.inetserver.asp.general)
  • Re: PHP & Cookies order form
    ... Use PHP sessions ... > I'm relatively new to the language, but I want to create a simple order ... > 1) Variablepassed from HTML page to script. ... > 3) If no cookie, script creates one, Variablethe value. ...
    (comp.lang.php)
  • PHP & Cookies order form
    ... I'm relatively new to the language, but I want to create a simple order ... Variablepassed from HTML page to script. ... If no cookie, script creates one, Variablethe value. ... I'm new to PHP and I have no experience of cookies. ...
    (comp.lang.php)
  • please explane cookies.
    ... When I start INDEX.PHP, I set a cookie. ... overwrite it. ...
    (alt.php)
  • Re: please explane cookies.
    ... When I start INDEX.PHP, I set a cookie. ... overwrite it. ...
    (alt.php)