<DIV id=RTEContent> <DIV>you could always put the header code above the rest of the code and html.</DIV> <DIV> </DIV> <DIV>A bit of code/ammendments to your page.</DIV> <DIV> </DIV> <DIV><FONT face=arial><?php</FONT></DIV> <DIV><FONT face=arial></FONT> </DIV> <DIV><FONT face=arial>$filename <SPAN class=keyword>= </SPAN><SPAN class=string>'/path/to/files/directory/on/server/'</SPAN><SPAN class=keyword>;</SPAN></FONT></DIV> <DIV><BR><FONT face=arial>if (isset($_GET['page'])) {<BR> $page.=".php";</FONT></DIV> <DIV><FONT face=arial></FONT> </DIV> <DIV><FONT face=arial> $filename.=$page;</FONT></DIV> <DIV> if(file_exists($filename)) {</DIV> <DIV> include("$page");</DIV> <DIV> }</DIV> <DIV> else{</DIV> <DIV> include("notfound.php");</DIV> <DIV> }<FONT face=arial><BR>}<BR>else
{<BR>include("welcome.php");<BR>}<BR>?></FONT><BR></DIV> <DIV><BR><BR><B><I>Matt Harris <mharrisweb@yahoo.co.uk></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Folks,<BR><BR>Hope your all ok.<BR><BR>I was after some basic advice, regarding setting up my site using php (this is my first php project).<BR><BR>I have my index page with two divs, one for the menu and one for the content where I pull in the different pages, by setting a variable thats the name of the page, in the url. Below is the code I have in my index.<BR><BR><?php<BR>if (isset($_GET['page'])) {<BR>$page = $page . "." . "php";<BR>include("$page");<BR>}<BR>else {<BR>include("welcome.php");<BR>}<BR>?><BR><BR>This works fine, but if I want to redirect the user to a different page using the header function, I get an error because there is html on my index page, before the php code.<BR><BR>How do you guys go about setting up your
sites in a resourceful way?<BR><BR>Am I just better off sticking to including a header and a footer on all my pages?<BR><BR>Any advice would be much appreciated.<BR><BR>Many thanks.<BR><BR>Matt<BR> <DIV> <HR SIZE=1> <FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>Play <A href="http://santas-christmas-party.yahoo.net/">Santa's Celebrity Xmas Party</A>, an exclusive game from Yahoo! </FONT>_______________________________________________<BR>Phpwm mailing list<BR>Phpwm@mailman.lug.org.uk<BR>http://mailman.lug.org.uk/mailman/listinfo/phpwm<BR></DIV></BLOCKQUOTE> <DIV><BR></DIV></DIV><p>
                <hr size=1><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://us.rd.yahoo.com/mail/uk/taglines/default/messenger/*http://uk.messenger.yahoo.com
">Yahoo! Messenger</a>
<font color="red">NEW</font> - crystal clear PC to PC
<a href="http://us.rd.yahoo.com/mail/uk/taglines/default/messenger/*http://uk.messenger.yahoo.com
">calling worldwide with voicemail
</a></font>