Register a domain and help support LQ
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-20-2002, 03:38 PM   #1
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
Question PHP Sessions

Hi guys

I,m just learning how to use sessions with Apache and PHP 4, but i,m worried about using cookies.

I dont want to use them at all because not everyone allows there browsers to accept them.

I think I know how to verify usernames and passwords, but if I use

session_start(); .... and declare $uname and $pword as global variables

where will these variables actually be stored? in cookies?

If so, what other methods are there, and are there any good tutorials on using them.

Thx Guys

Take it easy

Old 04-21-2002, 06:57 AM   #2
Registered: Aug 2001
Location: London UK
Distribution: Redhat 7.2, soon to be LFS!
Posts: 42

Rep: Reputation: 15
Unlike ASP, PHP does not rely on cookies in order to handle sessions. (Although cookies is the preferred method)

If cookies are not supported by the particular client, the SID (Session ID) can be embedded directly in the URL.

session_start(); // initialise session
session_register("foo"); // register vars

blah blah blah
<form method="post"
action="foobar.php?<? = SID?>" >


hope that helps



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
php sessions problems MaestroC SUSE / openSUSE 2 12-06-2005 09:06 AM
sessions in PHP zowey Programming 2 12-26-2004 07:35 PM
Troble on PHP Sessions Gerardoj Programming 4 05-25-2004 02:03 PM
Problem with php sessions sashhoney Linux - Software 7 08-28-2003 08:30 AM
Apache PHP and sessions Satriani Programming 0 04-21-2003 12:55 PM

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration