With sessions, the session_start(); function will initiate a session in the
severs tmp directory with a file name such as 55abhc8a83kqk etc.  The
session_name("name_of_var"); function allows you to create a unique name for
your session vs. the 55abhc8a83kqk.  A good way to check your sessions is to
do something like this:
<?php
session_start();
session_name(testing sessions);
print "<p>$session_id</p>";
?>
Or if you want to assign session vars, or unique variables you can do
something like this
<?php
$unique_number = rand();
// generates a uniqe number
session_start();
// starts the session
session_name($unique_number);
// names the session the unique number
session_register($unique_number);
// registers the unique number as a session var
print = "<p>$unique_number is your session id</p><p>$unique_number is your
registered variable</p>";
?>
If you go to php.net you can look up session() in the function list and it
will break it down alot better for you
HTH
Jas


"Marcos Lois BermúDez" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
A have two webs made in php, both uses a authentication based on session
suport.
I use in every page a session_start(); and a session_name( name); to get
different name for the sessions but when i get login i one web, and then go
to the other i get the same login.

what happend?
What means the session_name?

I use php-4.2.0 and apache-1.3.24 in a lunux box.

Any help will be apreciated.

Regards.

----------------------------------------------------
Marcos Lois Bermúdez
[EMAIL PROTECTED]
IQC-Services.
Carretera provincial 60 - 1
36210 Vigo - Pontevedra
Tel: +34 986 281 830
Fax: +34 986 415 074
http://www.iqc-services.com
----------------------------------------------------




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

Reply via email to