You are here: Re: New to Sessions 2 « PHP Programming Language « IT news, forums, messages
Re: New to Sessions 2

Posted by Toby A Inkster on 11/23/07 09:24

jodleren wrote:

> My problem - I need to transfer the sesstion to another page?
> say page1.php goes to page2.php ( <a href="page2.php"> ) ?

That's how sessions work. Data is shared between pages by default. That's
the whole point of them.

Simply call start_session() at the top of both pages, and they can share
data. (A lot of newbies think that start_session() creates a new blank
session, wiping out any old session data. It does not. Think of it as
meaning "start using the session", not "start a new session".)

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 14:20.]

It'll be in the Last Place You Look
http://tobyinkster.co.uk/blog/2007/11/21/no2id/

 

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

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