Reply to Re: New to Sessions 2

Your name:

Reply:


Posted by Erwin Moller on 11/23/07 08:24

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.

[Back to original 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

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