Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times

    session start php

    when session_start is used in a php file does that outomatically create a cookie on the users browser to identify the session or does that have to be done manually?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    It happens automatically.

    But is only created when you assign something to it:
    This "note" from the introduction section of the manual:

    Note: Please note when working with sessions that a record of a session is not created until a variable has been registered using the session_register() function or by adding a new key to the $_SESSION superglobal array. This holds true regardless of if a session has been started using the session_start() function.
    There is a special place on your website (determined by your webhost, specifically the PHP ini/config files) that determines where SESSION keys are stored. You can view them too. And you can have a PHP script view them. That is a way to determine "how many people" are on their site. PHP can view the number of sessions and look at the file create/update times. When a person leaves your site, the session will expire based on a configured time, which you can affect.

    A lot of things to read here:
    PHP: Sessions - Manual


  4. #3
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    thanks. you were right btw, i am amazed by the things we can do with php AWESOME


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com