Click here to Skip to main content
15,923,789 members
Home / Discussions / Web Development
   

Web Development

 
GeneralASPX question Pin
alex.barylski31-Oct-04 12:05
alex.barylski31-Oct-04 12:05 
GeneralRe: ASPX question Pin
Christian Graus31-Oct-04 12:33
protectorChristian Graus31-Oct-04 12:33 
GeneralRe: ASPX question Pin
alex.barylski31-Oct-04 13:11
alex.barylski31-Oct-04 13:11 
GeneralUK Postcode Checker Code Pin
Anonymous31-Oct-04 10:58
Anonymous31-Oct-04 10:58 
Generalfrom ASP to PHP Pin
aguest30-Oct-04 13:29
aguest30-Oct-04 13:29 
GeneralRe: from ASP to PHP Pin
Jack Puppy30-Oct-04 17:22
Jack Puppy30-Oct-04 17:22 
GeneralRe: from ASP to PHP Pin
aguest31-Oct-04 12:15
aguest31-Oct-04 12:15 
GeneralRe: from ASP to PHP Pin
Jack Puppy31-Oct-04 23:14
Jack Puppy31-Oct-04 23:14 
Session management is available in PHP. The default setup will store the session data in a temporary folder on the server. You can add your own custom handlers to provide your own storage method if need be. (I save session data to an mysql table)

You need to call session_start() on each page you'll be manipulating session data. You can access the session data via the $_SESSION superglobal:

page1.php

<br />
<?php<br />
// always call session_start 1st<br />
session_start();<br />
<br />
$_SESSION['session_data_item_1'] = 'one';<br />
$_SESSION['session_data_item_2'] = 'two';<br />
<br />
?><br />
<br />
<a href="page2.php">Goto Page 2</a><br />
<br />


page2.php
<br />
<?php<br />
<br />
// always call session_start 1st<br />
session_start();<br />
<br />
echo $_SESSION['session_data_item_1'];<br />
echo $_SESSION['session_data_item_2'];<br />
<br />
?><br />
<br />


php session tutorials:
http://www.phpfreaks.com/tutorials/41/0.php
http://www.free2code.net/plugins/articles/read.php?id=184

Lookup the session_ functions in php help file for more examples.


Pssst. You see that little light on your monitor? That's actually a spy camera, and I'm tracking your every move...
GeneralRe: from ASP to PHP Pin
aguest2-Nov-04 8:13
aguest2-Nov-04 8:13 
GeneralRe: from ASP to PHP Pin
Jack Puppy2-Nov-04 13:52
Jack Puppy2-Nov-04 13:52 
Generalstrange problem Pin
sianatia30-Oct-04 7:03
sianatia30-Oct-04 7:03 
GeneralRe: strange problem Pin
lanying_wzw1-Nov-04 0:52
lanying_wzw1-Nov-04 0:52 
GeneralRe: strange problem Pin
sianatia1-Nov-04 1:22
sianatia1-Nov-04 1:22 
GeneralDyanamic menus Java Applet Pin
rgoyal30-Oct-04 2:38
rgoyal30-Oct-04 2:38 
GeneralPaging the data Pin
hakanaktan29-Oct-04 21:27
hakanaktan29-Oct-04 21:27 
GeneralRe: Paging the data Pin
Paul Watson29-Oct-04 23:48
sitebuilderPaul Watson29-Oct-04 23:48 
GeneralRe: thanx Pin
hakanaktan30-Oct-04 0:17
hakanaktan30-Oct-04 0:17 
Generallink Pin
cmarmr29-Oct-04 5:20
cmarmr29-Oct-04 5:20 
GeneralRe: link Pin
R. Thomas29-Oct-04 17:42
R. Thomas29-Oct-04 17:42 
GeneralRe: link Pin
lanying_wzw1-Nov-04 0:49
lanying_wzw1-Nov-04 0:49 
GeneralNeed Guidance Pin
rgoyal29-Oct-04 0:28
rgoyal29-Oct-04 0:28 
GeneralRe: Need Guidance Pin
R. Thomas29-Oct-04 17:31
R. Thomas29-Oct-04 17:31 
GeneralRe: Need Guidance Pin
rgoyal29-Oct-04 23:51
rgoyal29-Oct-04 23:51 
GeneralRe: Need Guidance Pin
R. Thomas30-Oct-04 13:11
R. Thomas30-Oct-04 13:11 
GeneralPage re-submision Pin
TPN29-Oct-04 0:03
TPN29-Oct-04 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.