It is currently Wed Feb 08, 2012 5:30 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Global variable
PostPosted: Wed Feb 10, 2010 2:59 pm 
Offline

Joined: Wed Feb 10, 2010 2:43 pm
Posts: 1
Location: India
Hi Friends,
I am new to PHP.I am having some small clarification whether we use a Global variable for accessing one variable value into another PHP file.

Example :

I will assign the Global variable value in index.php file. I want to get the stored value into index1.php.

Those pages are separate

I get the values using OOPs concepts.

That means one common class file that having SET and GET function for the variable.

in INDEX file i set the value of the variable
in INDEX1 file i get the STORED value of the variable.

with out using SESSION

Is this Possible to make in PHP?.


Thanks in advance
Karthick

_________________
Karthick


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 5:13 pm 
Offline

Joined: Sun May 02, 2004 11:34 pm
Posts: 6500
Location: toronto, canada
have you tried DEFINE to make the variable? It will make it a constant, so not sure if that meets your needs.

_________________
Lostboy

Cat, the other other white meat

Please read Posting Etiquette before posting

You can always try Google


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: