Click here to Skip to main content
16,005,181 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: php help Pin
Mohammad Dayyan11-Feb-09 5:21
Mohammad Dayyan11-Feb-09 5:21 
AnswerRe: php help Pin
Marc Firth4-Mar-09 1:47
Marc Firth4-Mar-09 1:47 
QuestionDynamic subdomain Pin
SHINOJK4-Feb-09 4:43
SHINOJK4-Feb-09 4:43 
AnswerRe: Dynamic subdomain Pin
Marc Firth5-Mar-09 23:52
Marc Firth5-Mar-09 23:52 
QuestionDynamic subdomain Pin
SHINOJK4-Feb-09 4:04
SHINOJK4-Feb-09 4:04 
GeneralPHP Code Req. on payment Pin
Moon00923-Feb-09 22:15
Moon00923-Feb-09 22:15 
QuestionHelp regarding php Pin
tksrules1-Feb-09 20:42
tksrules1-Feb-09 20:42 
AnswerRe: Help regarding php Pin
jceresini6-Mar-09 12:49
jceresini6-Mar-09 12:49 
To set a session variable you first need to start your session:

<?php
 session_start(); /start the session
 $SESSION['testvar'] = "value1"; //set the session variable called "testvar" to the value "value1"
?>


Now if you open another page on your site that has the session_start() function called you can print the value stored in the session with

<?php
 session_start(); /start the session
 echo $SESSION['testvar']; //print value saved in previous session
?>


You will hvae to ensure your host has the session.save_handler and session.save_path php.ini values set. To test this you can try using my session test script:

http://www.joeceresini.com/testscripts/jc.sessions.phps

You can also see the values of those options in a php info file

<?php
 phpinfo();
?>



Joe Ceresini
Network Engineer
jceresini@hostmysite.com
Hostmysite.com
Questionphp basics Pin
s4_sabahatf1-Feb-09 17:19
s4_sabahatf1-Feb-09 17:19 
AnswerRe: php basics Pin
EliottA2-Feb-09 2:30
EliottA2-Feb-09 2:30 
AnswerRe: php basics Pin
Rao Rafique9-Feb-09 0:36
Rao Rafique9-Feb-09 0:36 
AnswerRe: php basics Pin
Ioannis_o59-Feb-09 6:01
Ioannis_o59-Feb-09 6:01 
QuestionPHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist31-Jan-09 19:01
LazyDragonfist31-Jan-09 19:01 
AnswerRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
EliottA2-Feb-09 2:33
EliottA2-Feb-09 2:33 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist2-Feb-09 4:31
LazyDragonfist2-Feb-09 4:31 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages [modified] Pin
EliottA2-Feb-09 4:34
EliottA2-Feb-09 4:34 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist2-Feb-09 4:44
LazyDragonfist2-Feb-09 4:44 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
EliottA2-Feb-09 4:46
EliottA2-Feb-09 4:46 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist2-Feb-09 4:53
LazyDragonfist2-Feb-09 4:53 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages [modified] Pin
EliottA2-Feb-09 5:02
EliottA2-Feb-09 5:02 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist2-Feb-09 5:13
LazyDragonfist2-Feb-09 5:13 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
EliottA2-Feb-09 5:14
EliottA2-Feb-09 5:14 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
EliottA2-Feb-09 5:15
EliottA2-Feb-09 5:15 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
LazyDragonfist2-Feb-09 5:32
LazyDragonfist2-Feb-09 5:32 
GeneralRe: PHP and MYSQL Getting all rows (around 10000 rows)of a query in a single html pages Pin
EliottA2-Feb-09 5:54
EliottA2-Feb-09 5:54 

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.