[PHP] A simple question please.

2003-01-22 Thread Denis L. Menezes
Hello friends.

I need to add a part of html (the banner, top menus and the logo) in all pages 
dynamically. I made this part of the html and converted same to php code using Print 
 command.

Now, how do I add this code in the other pages? Should I inclue require or include 
command? if yes? should I include after the body tag itself?

Thanks
denis


Re: [PHP] A simple question please.

2003-01-22 Thread Henry
it doesn't matter beforebody or after body as I know

- Original Message -
From: Denis L. Menezes [EMAIL PROTECTED]
To: PHP general list [EMAIL PROTECTED]
Sent: Wednesday, January 22, 2003 11:21 PM
Subject: [PHP] A simple question please.


Hello friends.

I need to add a part of html (the banner, top menus and the logo) in all
pages dynamically. I made this part of the html and converted same to php
code using Print  command.

Now, how do I add this code in the other pages? Should I inclue require or
include command? if yes? should I include after the body tag itself?

Thanks
denis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] A simple question please.

2003-01-22 Thread Clarkson, Nick


If the start of EVERY page is the same you could make your php include file
as follows;

?php
echo HTML;
echo TITLE;
echo /TITLE;
echo BODY;
?

Obviously padding it out a bit ;o)

Then at the top of every page put;

?php
require (header.php);
?

Similarly you coud do a footer for every page.

You can basically put it where you like as long as the HTML makes sense.

Nick

Another example, from http://www.php.net/manual/en/function.include.php

html 
?php 
  require($TEMPLATE_DIR/pages.header.inc); 
? 
 body 
 ?php require(content.inc);? 
/body 
/html 

...etc. 




-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2003 15:21
To: PHP general list
Subject: [PHP] A simple question please.


Hello friends.

I need to add a part of html (the banner, top menus and the logo) in all
pages dynamically. I made this part of the html and converted same to php
code using Print  command.

Now, how do I add this code in the other pages? Should I inclue require or
include command? if yes? should I include after the body tag itself?

Thanks
denis


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php