You are here: Re: Aren't session variable preserved using "Header('Location: xxx')"? « PHP Programming Language « IT news, forums, messages
Re: Aren't session variable preserved using "Header('Location: xxx')"?

Posted by d on 01/19/06 12:07

"R. Rajesh Jeba Anbiah" <ng4rrjanbiah@rediffmail.com> wrote in message
news:1137651890.637029.299510@o13g2000cwo.googlegroups.com...
> lwoods wrote:
>> I am trying to pass some info to another page on my site. I set
>> "session_start()" in page 1, assign a session variable to a value, then
>> execute a "header('Location: ....')." But on the target page I don't get
>> any session variable values! BTW, I used a relative location in the
>> Location header, not an absolute URL. The behavior looks like it started
>> another session, but it should not have.
>
> If your session uses cookie, it should work. But, if you use trans
> sid, it won't rewrite the URL in header()--it will *only* rewrite
> "url_rewriter.tags"

trans sid makes the site's URLs look like crap, and everyone supports
cookies these days, so it's not really an issue ;)

> --
> <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
>

 

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

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