Isset problem ... !
Posted: Thu Sep 12, 2002 2:27 am
I have a small problem. The script must first control if the of the user is fild in. If not the user is send back to the mayne page to fill in his namen.
If the name is set and sended to the cookie, the name must be appear auto.
The problem is, when you are filling in your name, it doesn't make a cookie. But it gose to right page. and doesn't send the people back to fill in ther names. The mayne problem is that the cookie isn't been made.
Here is my litle script.
if (isset($_POST['NewNaam'])) {
$Naam=$_POST['NewNaam'];
if (isset($_COOKIE['Naam'])) {
$Naam =($_COOKIE['Naam']);
echo '' ;
} else {
$cookieset = setcookie('Naam', $NewNaam, time()+43200);
if (!empty($cookieset)) {
$Naam = $NewNaam;
echo '';
} else {
echo 'error - cookie could not be set';
}
}
} else {
echo ("<META HTTP-EQUIV=\"refresh\" content=\"2;URL=index.php\">\n");
}
Thx you all, Skywalker
If the name is set and sended to the cookie, the name must be appear auto.
The problem is, when you are filling in your name, it doesn't make a cookie. But it gose to right page. and doesn't send the people back to fill in ther names. The mayne problem is that the cookie isn't been made.
Here is my litle script.
if (isset($_POST['NewNaam'])) {
$Naam=$_POST['NewNaam'];
if (isset($_COOKIE['Naam'])) {
$Naam =($_COOKIE['Naam']);
echo '' ;
} else {
$cookieset = setcookie('Naam', $NewNaam, time()+43200);
if (!empty($cookieset)) {
$Naam = $NewNaam;
echo '';
} else {
echo 'error - cookie could not be set';
}
}
} else {
echo ("<META HTTP-EQUIV=\"refresh\" content=\"2;URL=index.php\">\n");
}
Thx you all, Skywalker