[RESOLVED] Defining headers, body and footers
Posted: Sat Aug 05, 2006 12:23 am
feyd | Please use
Thanks for the help!
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Yes, I'm a noob, let me get that out of the way first. I just starting using php Tuesday, and found it to be simililar to what I've used in the past as far as accessing databases. But I was never really one for programming.
Now, onto my question. I was checking out [url=http://www.zend.com/zend/tut/feedback.php]this tutourial[/url], and figured I'd try it out on a website I'm working on transitioning to php. Now from what I've read in order for me to set cookies properly, I need to set them before any HTML, which is why I want to use this technique. However when I upload it to my server, it doesn't work, and shows the "$head = <<" tag everywhere. I would like to create a quick login at the top left of the page so members can sign in any time as well as the main login page. Does anyone have any experience using this technique? Or am I better off just putting the php code throught the page?
My server has php version 4.4.2 if it makes a difference.
This is the website as it looks now:
[url]http://www.dvmrs.org/MembersNew/index.php[/url]Code: Select all
<?php
$head = <<<ENDH
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Feedback form</title>
</head>
<body bgcolor="white">
<h1 align=center>Feedback form</h1>
ENDH;
$tail = <<<ENDT
<hr>
</body>
</html>
ENDT;
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]