Page 1 of 1

using variables from another php file...

Posted: Wed Jun 14, 2006 8:05 pm
by biggie
long story short...
I have a html file that contains a simple form that among other things has 3 selects..for day, month and year....the form's action is a php file....in that php file the 3 selects are joined under one variable...something like $date="$year -$month - $day"..something like that. anyway how do I use this variable(that is contained in file1.php) in another php file? I don't know if u are folowing me here...simply said..I want to use a variable that is found in another php file. how can I "extract" it from there or...?

10x

Posted: Wed Jun 14, 2006 8:16 pm
by LiveFree

Code: Select all

include('some_file_with_the_vars.php');
Include the file before you start using the vars or you'll get warnings