You are here: Re: what's wrong? « All PHP « IT news, forums, messages
Re: what's wrong?

Posted by Frits van Leeuwen on 09/28/73 11:56

"-Lost" <spam_ninjaREMOVEME@REMOVEMEcomcast.net> schreef in bericht
news:W6OdnYuWhZNMUnfZnZ2dnUVZ_rWdnZ2d@comcast.com...
> "Frits van Leeuwen" <Frits.vanLeeuwen@nospam.nl> wrote in message
> news:109cb$44eacb91$c2ab6db8$25113@news1.tudelft.nl...
> > <?php
> > if (isset($_COOKIE['LeeuwendeelTaal']))
> > {
> > header(sprintf('location:
> > http://www.leeuwendeel.info/'.$LeeuwendeelTaal.'/index.htm'));
> > exit;
> > }
> > ?>
>
> I would be interested in hearing from someone else, but I do not think
sprintf is being
> used correctly here.
>
> Why not just:
>
> header('Location: http://url/' . $variable . '/page/');
>
> Also, I am not entirely sure but you cannot just access a variable in a
cookie in that
> fashion. For example, at least, it would need to be $_COOKIE['variable']
that you
> redirect to. Make sure to read:
>
> http://us3.php.net/manual/en/function.setcookie.php
>
> ...in its entirety.
>
> -Lost
>
Thanks, it's working now

 

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

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