Kahuki Webmaster Forum and Discussion Community  

Go Back   Kahuki Webmaster Forum and Discussion Community > Website Development & Management > Programming > PHP



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-12-2006, 03:58 PM
Member
 
Join Date: Jan 2006
Posts: 60
neca is on a distinguished road
about php...do session variables transmit themselves from a php page to another?

cause i know if i use a form when i push submit all the variables entered in the textbox go to the action page...so,without using a form,is the same principle working?do they transmit from page to page?....cause i tried and seems it doesn't work..so do i have to work more or just drop the idea?

Reply With Quote
  #2 (permalink)  
Old 11-12-2006, 04:09 PM
Rookie
 
Join Date: Nov 2005
Posts: 3
lonestar91 is on a distinguished road
Yes they do go from page to page if you have session_start() at the top of every page.

ps - remember that sessions only work if you have cookies enabled, because they work using cookies a little.

Reply With Quote
  #3 (permalink)  
Old 11-13-2006, 01:48 PM
Rookie
 
Join Date: Aug 2006
Posts: 6
dotcom1 is on a distinguished road
initializesession.php
session_start()
$_SESSION['testvar'] = "test";


restievesession.php
session_start()
echo $_SESSION['testvar']


JUST TRY TO RUN 1ST FILE "initializesession.php" AND THEN "restievesession.php" YOU WILL GET THE OUTPUT,BUT IF U RUN THE 2ND FILE "restievesession.php" FIRST THEN U NEVER GET THE OUT,SO FIRST U INITIALIZE THE VARIABLE IN THE SESSION AND THEN U CAN RETRIEVE THAT VARIABLE ANY WHERE IN THE PROJECT BUT THE CONDITION WILL BE U MUST DEFINE session_start() FUNCTION

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
php variables in url..? erhard PHP 4 10-30-2007 02:58 PM
ASP.NET Global function & variables? mentoo Programming 2 02-07-2007 08:15 AM
How to watch MTV U.S.A LIVE!!! There is a website that transmit MTV U.S.A? Read the details? _yaki General Discussions 2 02-02-2007 08:58 AM
Inserting PHP variables into a PHP document using fwrite? Jules PHP 1 01-08-2007 09:17 PM
In php, I am calling a php page from my main page. but the problem is that the updated session values are not? PJPsyco PHP 2 07-07-2006 02:05 AM


All times are GMT. The time now is 10:08 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0