Thread: PHP question
View Single Post
Old 05-09-2004, 07:32 AM  
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
Do you use substract.php by itself at some point? If not, why do it like that? Makes no sense.

If you do not use it seperately, just do include('substract.php') and set the 2 variables you want to substract before the include, the substract.php will see all variables your main php sees at the include() point.

The other usefull thing really would be using a function instead of an include file. But I am guessing this is just a simple example and what you are trying to do is more complicated.
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote