Ross wrote:
Hi,
I want to increment a cookie by 1 every time a click a button
if (isset($add) {
$number++;
setcookie(cookie[number], $number Is the number)
}
I know I should retireve the cookie value for $number but the problem is it
has 2 bits, a number and a bit of text.
in your case
]
To: Ross [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Wednesday, September 14, 2005 1:57 PM
Subject: Re: [PHP] incrementing cookie
Ross wrote:
Hi,
I want to increment a cookie by 1 every time a click a button
if (isset($add) {
$number++;
setcookie(cookie[number], $number Is the number
Hi,
if (isset($add)) {
$pakora++;
setcookie(cookie[pakora], $pakora Pakora);
}
If I'm not mistaken, you also need to be sure that you are writing your
script to html/display and not redirecting to another page after the cookie
has been set - as redirecting will not write the
3 matches
Mail list logo