What's the best I can do to solve my trouble :
I got a simple page index-tmp who include a code snippet who test if a cookie
exist and if yes redirect to the user account page but the trouble
is when I didn't 've a cookie the page still redirect to the user account page.
here is the following code :
<?
$cookie = $_COOKIE["free-nickname"];
if (!cookie == null) {
echo '<script langage = "javascript ">';
echo " document.locati on.href = 'index_utilisat eur.php';";
echo '</script>;';
}
else {
echo '<script langage = "javascript ">';
echo " document.locati on.href = 'index.php';";
echo '</script>;';
}
?>
thx in advance
I got a simple page index-tmp who include a code snippet who test if a cookie
exist and if yes redirect to the user account page but the trouble
is when I didn't 've a cookie the page still redirect to the user account page.
here is the following code :
<?
$cookie = $_COOKIE["free-nickname"];
if (!cookie == null) {
echo '<script langage = "javascript ">';
echo " document.locati on.href = 'index_utilisat eur.php';";
echo '</script>;';
}
else {
echo '<script langage = "javascript ">';
echo " document.locati on.href = 'index.php';";
echo '</script>;';
}
?>
thx in advance
Comment