Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: php session create

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    1

    php session create

    how to created a session in php
    plz suggested me best php training institute ahmedabad as you know best knowledge.

  2. #2
    Junior Member
    Join Date
    Mar 2012
    Posts
    1
    <?php
    session_start(); // start up your PHP session!
    ?>

    I dont have any idea of PHP training institute in ahmedabad but i would like to suggest a very basic book of PHP.Try 'Head first PHP', It is the best book for absolute beginners.You can download it.
    Last edited by weegillis; 04-17-2012 at 04:22 PM. Reason: Added helpful link

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Bascically Session variables are maintained by webserver. (i-e)Physically the value of any Session variable will be written to a file located in the web server. In php, we can set/use the session varible using $_SESSION. Say for examble, if we need to put the user email (e.g $email) in sesssion, we can use it as $_SESSION['email'] whose value should be set as $_SESSION['email']=$email. Whenever assigning this session variable, a file will be written to the web server at location specified by session_path variable in php.ini file.

  4. #4
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    <?php
    session_start();
    // store session data
    $_SESSION['views']=1;
    ?>

    <html>
    <body>

    <?php
    //retrieve session data
    echo "Pageviews=". $_SESSION['views'];
    ?>

    </body>
    </html>

  5. #5
    Junior Member
    Join Date
    Apr 2013
    Posts
    4
    you can create session in php by following code.

    <?php session_start(); ?>

    <html>
    <body>

    </body>
    </html>

    As i am not ahmedabad resident but i can suggest you best php book for beginners. 'Head first Php' is the best book for beginners.

Tags for this Thread

Posting Permissions

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