Custom Session Class with MySQL session_id upon post ?

Discussion in 'PHP' started by tin2mon, Oct 16, 2010.

  1. #1
    Hi,

    i am doing a custom session to use mysql and i was wondering what would be the correct way to initiate an existent session ?

    To explain a little more about what i am doing, this is a communication between my application and my website, i am not using cookie at all, in fact inside my class i have cookies disabled so the only way to send the id back from my application is using POST and SSL because that is how i setup my php code.

    would this, be a way to go or is there better approch to it ?
     
    tin2mon, Oct 16, 2010 IP
  2. lomb

    lomb Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?php
    // Start session
    session_start();
    // Set Varriable from post
    $_SESSION['test'] = $_POST['sid'];
    // Show session
    echo $_SESSION['test'] ;
    // Show unique session id
    echo session_id();

    ?>
     
    lomb, Oct 16, 2010 IP