LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-20-2002, 02:38 PM   #1
RecoilUK
Member
 
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

RecoilUK
 
Old 04-21-2002, 05:57 AM   #2
gene_gEnie
Member
 
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.

i.e.
<?
session_start(); // initialise session
session_register("foo"); // register vars
?>

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

blah
</html>

hope that helps

Martin
 
  


Reply


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/Novell 2 12-06-2005 08:06 AM
sessions in PHP zowey Programming 2 12-26-2004 06:35 PM
Troble on PHP Sessions Gerardoj Programming 4 05-25-2004 01:03 PM
Problem with php sessions sashhoney Linux - Software 7 08-28-2003 07:30 AM
Apache PHP and sessions Satriani Programming 0 04-21-2003 11:55 AM


All times are GMT -5. The time now is 11:16 PM.

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