session info

Discussion in 'Pre-Sales Questions' started by novon1, Jul 19, 2004.

  1. novon1

    novon1 Guest

    I was wondering how aMember handles passing of session info. Does it pass passwords and login information with the session info as well? Is this secure?

    Thanks
  2. erikcw

    erikcw New Member

    Joined:
    Nov 15, 2004
    Messages:
    54
    I too am curious about how the sessions are handled. Can anyone list which session variables are carried from page to page. I would like to integrate some of the data into my other applications. (example, pass the user id in a session cookie so that I can query the db and pull out the users first name...)

    Any ideas?
  3. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    Yes, aMember passes all user information via session and it is secure.

    You can use any session information from aMember on your pages.
  4. alanpeto

    alanpeto New Member

    Joined:
    Dec 28, 2004
    Messages:
    29
    I tried doing that (adding member information on a php page) by following these directions:

    2. Adding Member Information to PHP Pages
    If you are using PHP pages on your site, you can also add member information to additional pages. In this case you are using session information to add the data, it will only appear when a member is logged in.
    To add a welcome message use the following code:

    PHP:
     <?   
     
     session_start
    ();  
     
     print 
    "Welcome, " $_SESSION['_amember_user']['name_f'] . " " $_SESSION['_amember_user']['name_l'];  
     
     
    ?>  
     
      

     Again, added fields must be used as  
      
        
     $_SESSION['_amember_user']['data']['phone']  

    However I get his error message:

    PHP:
    Warningsession_start(): Cannot send session cookie headers already sent by (output started at /home/navcopsc/public_html/members/index.php:9in /home/navcopsc/public_html/members/index.php on line 123

    Warning
    session_start(): Cannot send session cache limiter headers already sent (output started at /home/navcopsc/public_html/members/index.php:9in /home/navcopsc/public_html/members/index.php on line 123
  5. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    add this line:

    <?php session_start(); ?>

    as first line of your index.php
  6. kobisrael

    kobisrael New Member

    Joined:
    Aug 14, 2005
    Messages:
    6
    I keep on getting the next message, any one can advise?

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/kobi-isr/public_html/newsite/sample7-MEMBERS.php:5) in /home/kobi-isr/public_html/newsite/sample7-MEMBERS.php on line 223
  7. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    It is said above: FIRST LINE of your file!
    Have a look.

Share This Page