From: "Andy B" <[EMAIL PROTECTED]>

> From what I understand about sessions you can
> give a session a particular name like doing:
> session_start("SessionName");

You can give it a name, but you don't have to. PHP will use the default name
if you don't and you'll just need to use session_start();

> So in practicle means I can do this:
> <?php /*file #1*/
> session_start($name);
> $_SESSION[name]=$name;
> $_SESSION[email]=$email;
> /*.....*/
> ?>
>
> now my question is this: will i have to declare
> session_start($name); at the top of every file that
> needs to use that session name?

If you give the session a custom name, then, yes, you'll have to use that
name on every page. $name can be something that in an include file or a
constant, etc, though. Again, you don't _have_ to give a name, though.
There's no real advantage to using another name, though, as it's going to be
sent to the user in a cookie or the URL, anyhow.

---John Holmes...

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

Reply via email to