Posted by Lee David on 06/06/05 00:49
Can you include common code in a script? What I'm looking for is
eliminating the duplicate connection code to the database so if it ever
changes I only have to update one place. I put an include where the code
was, but that resulted in an error.
File x.inc
variable1 = 'fred';
variable2 = 'ginger';
variable3 = 'rogers';
File y.php
include("x.inc");
if (variable1 == "fred") yada, yada, yada
Any help is appreciated!
Lee
Navigation:
[Reply to this message]
|