View Full Version : ok, so, php
Carl
November 24th, 2000, 00:16
well,
what i want to do is i'm using php in a similar fashion to shtml but i want to insert a variable called $header in the main bit of the page and read it off the header file.
jvv
November 24th, 2000, 05:26
Uh... I'm not really sure what you're trying to do here ?
Koolguy
November 24th, 2000, 11:24
Do you mean having a vaiable winin the header file?
header.php
<?
$var="some variable";
?>
main.php
<?
require("header.php");
echo $var;
?>
Carl
November 24th, 2000, 13:27
yeah, something like that
razor
November 25th, 2000, 11:16
make a header.php and a footer.php. then everypage you make just name it with a .php extension and use the include() function to call header.php and footer.php
EX:
<? include("header.php") ?>
your html code or whatever here
<? include("footer.php") ?>
[Edited by razor on 11-26-2000 at 09:51 AM]
Powered by vBulletin® Version 4.1.7 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.