PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



Global variable

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General
View previous topic :: View next topic  
Author Message
Karthickraj.s



Joined: 10 Feb 2010
Posts: 1
Location: India

PostPosted: Wed Feb 10, 2010 1:59 pm    Post subject: Global variable Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Wed Feb 10, 2010 4:13 pm    Post subject: Reply with quote

have you tried DEFINE to make the variable? It will make it a constant, so not sure if that meets your needs.
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum