Hi,

No not difficult. Just add:

session_start();

at the very top of all scripts or any script you want to have access  
to session variables.

Then you can use variables like:

$_SESSION['var']

on any page and they are available, once set, from script to script.

Sincerely,
Mike
-- 
Mike Brandonisio          *    Web Hosting
Tech One Illustration     *    Internet Marketing
tel (630) 759-9283        *    e-Commerce
[EMAIL PROTECTED]    *    http://www.jikometrix.net

     JIKOmetrix - Reliable web hosting


On Jun 28, 2006, at 2:12 PM, J Siegel wrote:

>> I like to create session variables and test for them:
>>
>> if (isset($_SESSION['flag'])){
>>      //do stuff
>> } else {
>>      //redirect to home page
>> }
>>
>> Only your php scripts would know what variable to set.
>>
>
>
> That is exactly the kind of thing I'm interested in.  I've never used
> session variables.  Is there any trick to them?  Don't they "live" for
> a certain period of time?  Would that allow someone to access my site
> and then access my php script on their own afterwards?
>
> Thanks for your suggestion.
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor -------------------- 
> ~-->
> Yahoo! Groups gets a make over. See the new email design.
> http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/CefplB/TM
> -------------------------------------------------------------------- 
> ~->
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL  
> web database possibilities through group learning.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to