Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2007, 09:49 AM
Senior Member
 
Join Date: Mar 2007
Posts: 193
Default variable from one file to the other

How can I send that variable from one file to the other?I have a variable called $url that is defined in the first file. now i want to use that variable in the second file.

Any advice
Reply With Quote
  #2 (permalink)  
Old 06-29-2007, 09:50 AM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default

you could save the variables as Session variables
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 09:51 AM
Senior Member
 
Join Date: May 2007
Posts: 284
Default

You could put your variables in vars.php, and then

include("vars.php");

At the top of every page you want the variables in.
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:09 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0