free
This is our archive, please go to the main forum page for the latest discussions and news about free web hosting.


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]





  
  News · Search free hosts · Free file hosting · Free image hosting · Reviews · Forums · Related Links · Advertising Info · Contact Us


Copyright © 1996-2008 Per Olof Sandholm. All rights reserved. Privacy Statement

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum