You are here: Re: I do not understand why... « All PHP « IT news, forums, messages
Re: I do not understand why...

Posted by Frits van Leeuwen on 10/01/06 18:50

> Hello everyone,
>
> I do not understand why it's not working.
> I have index.php.
> I like to make a choice Dutch or Englich by clicking at a flag. After it I
> like to set a cookie and go back into index.php and now, I have only a
> page in the chosen language.
>
> But when I click on a flag, I go to another file, taal_NL.php, there it
> set a cookie.
> But when I use
>
> header('Location: http://www.Leeuwendeel.info/index.php');
> exit;
>
> I go back without set a cookie.
>
> What happen? Why does this not work?
>

Ok I found some thing. But how do I use it.
This is what I found:
<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
window.location = "index.php"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
</body>
</html>
I translate it in PHP, but I think it's wrong. Who can help me?<?php
setcookie("LeeuwendeelTaal", "en", time()+3600*24); // 1 dag
echo "<html>";
echo "<head>";
echo "<script type="text/javascript">";
echo "<!-- ";
echo "function delayer(){";
echo " window.location = "index.php"";
echo "}";
echo "//-->";
echo "</script>";
echo "</head>";
echo "<body onLoad="setTimeout('delayer()', 5000)">";
echo "</body>";
echo "</html>";
?>

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
4017 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация