Re: Require Session example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hie..
Write a script as follows in the file where you want to unregister variables
<?
session_start();
session_unregister("sessName"); //to unregister a session variable
session_unset(); //to reset the user session
?>

visit following link, might be useful to you
http://www.digiways.com/articles/php/sessauth/


--
Thanks and Regards

Sachin Ramdasi
Solversa Technologies Pvt. Ltd.
Pune - India
http://www.solversa.com
Office: (+91) 020 5881741
Cell : (+91) 9822276433

"Sachin" <sachin.ramdasi@solversa.com> wrote in message
20031016114749.60099.qmail@pb1.pair.com">news:20031016114749.60099.qmail@pb1.pair.com...
> Hi Rinku
> This is is example to use for session :
> --------------------------------------------------------------------------
--
> --------------------------------------------
> <?
> //first.php
> session_start(); // starting session
> // session variables must be global
> global $sessName;
>
> $sessName="Rinku";
> session_register("sessName");
> ?>
>
> Now you can acess this session variable in another php file as follows :
>
> <?
> //second.php
> session_start(); // starting session
>
> echo "Name from the session variable is ".$sessName; // This should
display
> Rinku
>
> ?>
>
> Thanks and Regards
>
> Sachin Ramdasi
> Solversa Technologies Pvt. Ltd.
> Pune - India
> Office: (+91) 020 5881741
> Cell : (+91) 9822276433
>
> "Rinku Shivnani" <rinku@banas.guj.nic.in> wrote in message
> 3F8EA278.16580.B15932@localhost">news:3F8EA278.16580.B15932@localhost...
> > Dear all,
> >
> > I need session example. Can any of you send me some session
> > example in php pls. I wd be thankful to you.
> >
> >
> > Regards,
> > Rinku

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux