In PHP >= 4.3.3 versions, start a session when you have a session started already, 
causes a notice error and the second call is ignored.

In older versions, the second call is ignored without errors (assumes the first 
session started)

Put this to your top.php:

@session_start();

And then, remove all the session_start from the others php files, when you are done, 
remove the eat '@' in the session_start() (isn't smart)


-----Mensaje original-----
De: Ryan A [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 15 de septiembre de 2003 11:11
Para: [EMAIL PROTECTED]
Asunto: [PHP] Sessions doubt
Importancia: Baja


Hi,
I have a small (simple?) doubt, if you know the answer kindly reply.

I have a top.php and bottom.php template files so that the whole site has
pretty much the same look and feel, then I have around 150 scripts that call
this files such as index.php or something.php like so:

<?php
session_start();
include "top.php";
subject or page matter here
include "bottom.php";
?>

I am relying heavily on sessions, right now its become an habit for me to
have session_start(); on every page as I start to write it, but have started
seeing some funny results as I have a session_start(); in both the calling
file and the top.php....

do I really need to have it in both or just one?
or does it really matter at all?
 if just one it should be the file that is calling top.php right?

Thanks,
-Ryan A



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to