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

Posted by jodleren on 11/23/07 11:02

On Nov 23, 10:24 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
> jodleren wrote:
> > Hi!
>
> > I started a thread app 2 weeks ago and redlied to that, but it seems
> > to be so low in the list, that it will not be seen.
>
> > My problem - I need to transfer the sesstion to another page?
>
> > say page1.php goes to page2.php ( <a href="page2.php"> ) ?
>
> > So, s start_sesstion, $_SESSION["fgdf"]=fsdgdf should be readable by
> > the other file... how do I achive that?
>
> > WBR
> > Sonnich
>
> Add to both pages:
> session_start();
>
> Do this before you do anything else, like creating output.
> so on page1.php:
>
> session_start();
> $_SESSION["test"] = "Hi";
>
> and on page2.php
> session_start();
> echo $_SESSION["test"];
> // should say Hi
>
> Regards,
> Erwin Moller
>
> PS: Make sure you have error reporting ON.
> PS2: Make sure your php.ini doesn't have session_auto_start on.

Thanks, I got it to work. Toby's explanation cleared things up.

Erwin, ma vist tunnen sind. Kas sa oleks nii hea, saata mulle maili,
aadress peaks siin sama olema.

 

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

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