Re: [PHP] Can includes be used for head tags?

2009-05-11 Thread Daniel Brown
On Mon, May 11, 2009 at 12:41, Gary gwp...@ptd.net wrote:
 I was thinking of creating a php include for the meta tags for a site.  Is
 this possible?

Of course it would be.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

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



RE: [PHP] Can includes be used for head tags?

2009-05-11 Thread Jay Blanchard
[snip]
I was thinking of creating a php include for the meta tags for a site.
Is 
this possible?
[/snip]

Here is one model...

?php
session_start();
 
 include(inc/dataConnect.inc);
 
/* see if anyone has logged in, if not call the login form */
if( == $_SESSION['user']){
include(head_of_file.php);
include(login.php);
include(tail_of_file.php);
} else {
/* display head of file */
include(head_of_file.php);

/* now use cases to display proper forms */
switch ($_GET['form']){
case foo:
include(foo.php);
break;

case bar:
include(bar.php);
break;

case glorp:
include (glorp.php);
break;
}
/* case is chosen, display tail of file */
include(tail_of_file.php);
}
?

Hear is head_of_file.php

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html xmlns=http://www.w3.org/1999/xhtml; lang=en_US
xml:lang=en_US
head
title/title
link rel=stylesheet href=css/primary.css
type=text/css /
script type=text/javascript
src=inc/jquery-1.1.3.1.js/script   
/head

body
div id=content

div id=headernbsp;/div!-- /header --

div id=leftContent/div!-- /leftContent
--

div id=rightContent

Here is tail_of_file.php

/div!-- /rightContent --
 /div!-- /content --
div id=footer
p style=text-align: right; font-size: 0.7em;
font-weight: bold;Copyright copy;2007/p
/div!-- /footer --
/body
/html

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



Re: [PHP] Can includes be used for head tags?

2009-05-11 Thread tedd

At 12:41 PM -0400 5/11/09, Gary wrote:

I was thinking of creating a php include for the meta tags for a site.  Is
this possible?

Gary


Gary:

Certainly -- I do that with my sperling.com site.

Every page has it's own set of meta tags.

Cheers,

tedd



--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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