SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I'm working on a script that will (hopefully) make it so that a user's username and password will not need to be entered multiple times while "doing" things on the site...the same way it is with vBulletin basically.

    I don't know much about sessions with PHP, but I've heard they're quite useful. Would they be a solid alternative to the use of cookies to accomplish this? Either way, could someone point me to a *VERY* simple tutorial on either feature? I've read the manual areas on PHP.net, but for the most part they're hard to understand...more like reading from a dictionary than a tutorial.

    Thanks!

  2. #2
    SitePoint Zealot oodie's Avatar
    Join Date
    Jul 2000
    Location
    Misty Mountain
    Posts
    125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you still use PHP3 then you have to use PHPLib to create sessions. PHP4 already supports session.

    Actually there are 2 ways to pass session variables from page to page in PHP4, cookies and URL. The recommended way is URL because cookies depends on users' browsers. So perhaps it's a good aternative to cookies. I'm also still learning so I can't help you much with this, sorry. But there are several tutorials about session handling at PHPBuilder http://www.phpbuilder.com/columns/ and one at Zend http://www.zend.com/zend/tut/session.php

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The above tutorials will definitely get you started. For the record, however, PHP4's in-built session features will save you considerable time, since they essentially wrap a programmer-friendly interface around a cookie-based solution.

    -Kev.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference


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
  •