You are here: Re: Funny session behavior « PHP Programming Language « IT news, forums, messages
Re: Funny session behavior

Posted by iktorn on 04/09/07 19:59

Baeribeeri napisał(a):
> I am writing a foto upload site. A PHP page displays the uploades
> fotos an the customer can choose several things. The data of the fotos
> are kept in an array called bilder. I keep the data in a session. When
> the customer send the data the following code will be run:
>
> <?php
> session_start();
> // print_r($bilder);
> // exit(); // all data is in the session file, but the array bilder[]
> is empty now!
> include ("database.php");
> $dbid = connect();
> ....

http://php.net/manual/en/function.session-register.php

"If your script uses session_register(), it will not work in
environments where the PHP directive register_globals is disabled."

1) check your php.ini for register_globals directive and turn it on (not
recommended)
2) use $_SESSION variable - best way to avoid such problems

--
Wiktor Walc
http://phpfreelancer.net

 

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

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