SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: session

  1. #1
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    session

    Sirs,

    I am new to php,I have been in c++.


    Please help me how to maintain session in php.How can i do it.

    Thanks in advance,
    arunkumar

  2. #2
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Zealot allanon's Avatar
    Join Date
    Jan 2005
    Location
    United States
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    session_start() at the top of all pages
    - Monster!

  4. #4
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sir,
    i have read the link content and example.In example they given the code is i should check the session in all page and where should store the seesion id.
    In files?

    ArunKumar

  5. #5
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also in phpinfo there is separate table for session and there are some values what is the use of it
    .
    ArunKumar

  6. #6
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case you want to be able to secure pages:
    I suggest you rather start with this article from Kevin Yank. The link posted above points to a rather hard to understand Auth system if you are a newbie.

    http://www.sitepoint.com/article/use...sessions-mysql

    if you're just curious about sessions, which seems to be the case, just add session_start() at the top of your pages, as said above.
    Then set values using the $_SESSION superglobal:

    PHP Code:
    $_SESSION['test'] = 'this is a test'
    you should then e able to use it in all your pages, for example:

    PHP Code:
    echo($_SESSION['test']); 


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •