|
Posted by Richard Lynch on 04/07/05 06:58
On Wed, April 6, 2005 1:59 am, p80@free.fr said:
> I'm having problem with my session, when I login my session is registered
> ok but
> when I click on another page it's canceled again.
> I use that kind of link:
> index.php?menu=voyage&sid=$sess_id
>
> then on top of the page I use:
>
>
> if(session_id()){
>
> session_id(strip_tags($_GET['sid']));
> session_start();
This only starts a session if you have session_id (above) which only
happens if you already started a session...
Perhaps you meant: if (!session_id()) above.
More likely, you don't need any of these 4 or 5 lines of code except:
session_start();
PHP manages the session ID for you just fine, for almost all uses.
> $sess_id = session_id();
> $nom_user = $_SESSION['session_nom'];
> $prenom_user = $_SESSION['session_prenom'];
> $bienvenue="Bienvenue $prenom_user $nom_user";
> }
>
> http://81.57.4.105/~pat/alliance/ (user and pass = admin) can someone
> tell me
> how when I click on the top boxes link the session is not kept? here is
> the
> code: http://hashphp.org/pastebin?pid=2354
>
> thanx in advance
>
> Pat
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|