Posted by Steve on 10/06/06 13:50
you've already posted this question. you've gotten several responses.
DON'T USE COOKIES.
instead use $_SESSION
problem solved.
"Frits van Leeuwen" <Frits.vanLeeuwen@nospam.nl> wrote in message
news:51702$45261c15$c2ab6db8$30066@news2.tudelft.nl...
| Hello everyone,
| I try to use setcookie() or header().
| I need a cookie. but when I use setcookie() with header() the cookie will
| not set.
| When I use setcookie() without header() , the cookie will set but I do not
| have a redirection back to index.php.
| I saw at internet, you can use header() within set-cookie. I try some
thing.
| But it does not work.
| who can help me?
|
| <?php
| unset($_COOKIE[LeeuwendeelTaal]);
| switch ($_GET[ln])
| { // taal keuze
|
| case 'NL': // Nederlands
| $language = "NL";
| break;
|
| case 'EN': // Engels
| $language = "EN";
| break;
|
| default: // geen taalkeuze gemaakt.
| $language = "";
| break;
|
| }
| header("Set-Cookie: LeeuwendeelTaal=$language; expires=time()+3600*24");
//
| 1 dag
| header("Location: /index.php");
| exit;
| ?>
|
|
Navigation:
[Reply to this message]
|