<?xml version="1.0"?>
<rss version="2.0">
 <channel>
  <title>A little php help | WPDFD.com Forums</title>
  <link>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/</link>
  <description>A Scripting forum thread at WPDFD.com</description>
  <language>en-us</language>
  <pubDate>01/05/04, 005 02 2004 2004:%i:1073340120 17:02:00</pubDate>
  <lastBuildDate>06/07/13, 158 19 2013 2013:%i:1370596774 05:19:34</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NineLabs Framework Feed Generator</generator>
  <managingEditor>sitemaster@wpdfd.com</managingEditor>
  <webMaster>sitemaster@wpdfd.com</webMaster>
     <item>
    <title>Maia  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p119</link>
    <description><![CDATA[I am very new to writing php (if &quot;writing&quot; is the correct word). I wanted to make a small include script for headers where I could change one page and see the effects across my site, but have the actual text for the header on the individual pages. So I threw this together. I'd like to know if there are serious bugs here, or if this is a unsafe/unstable/strange? way to do it. It works fine on my site, without any errors, but bad coding can do that sometimes. Here is the code:<br /><br />pagetitles.php<br /><code><br />&lt;?<br />function Skin_title($page_title) {<br /> $this-&gt;page_title = $page_title;<br /> <br /> &nbsp; &nbsp; &nbsp;print '&lt;table cellpadding=&quot;3&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; bgcolor=&quot;efa02c&quot;&gt;<br />&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;' . $page_title . '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />}<br /><br />?&gt;<br /></code> <br /><br />index.php<br /><code><br />&lt;?php include(&quot;pagetitles.php&quot<img src="/images/emoticons/wink.png" class="smiley" />; ?&gt;<br />&lt;?php skin_title('Songs and First Lines'); ?&gt;<br /></code><br /><br />Thanks,<br />Maia]]></description>
    <pubDate>01/05/04, 005 02 2004 2004:%i:1073340120 17:02:00</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p119</guid>
   </item>
     <item>
    <title>Suzanne  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p120</link>
    <description><![CDATA[Starting with OOP is pretty good, most people start with procedural!<br /><br />It doesn't appear to have any security flaws, however you can always tuck your included files in a non-web-browsable directory (pagetitles.php) to make sure?<br /><br />I would note that with your markup, however, it would be much more portable to have it as '&lt;h1&gt;' . $page_title . '&lt;/h1&gt;' instead, and use CSS to style it. (or with &lt;div&gt; tags -- the table element isn't being used well in your example). <br /><br />]]></description>
    <pubDate>01/05/04, 005 44 2004 2004:%i:1073349840 19:44:00</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p120</guid>
   </item>
     <item>
    <title>Maia  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p121</link>
    <description><![CDATA[Thanks. I have some more ideas now and hope to impliment your suggestions sometime soon. I've been spending way too much time over at <a href="http://www.quirksmode.org/">Quirksmode</a> investigating css &amp; div options. Sad how things die...in some ways tables were rather nice.]]></description>
    <pubDate>01/08/04, 008 01 2004 2004:%i:1073595661 16:01:01</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p121</guid>
   </item>
     <item>
    <title>Jdenny  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p122</link>
    <description><![CDATA[Over-complicated or what!<br /><br />The simple answer is simmilar to using SSI (server-side-includes), but obviously with much more potential, (you can do stuff like you origional solution - but only do so when the complexity is needed to add value to your work).<br /><br />PHP Includes:<br />in all of you pages put<br /><span style="font-family:Courier;">&lt;?php<br /> $page_title = &quot;....&quot;;<br />include('header.php');<br />?&gt;</span><br /><br />in header.php put<br /><span style="font-family:Courier;"><br />&lt;table cellpadding=&quot;3&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; bgcolor=&quot;efa02c&quot;&gt;<br />&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;?php echo $page_title; ?&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br /></span>]]></description>
    <pubDate>02/14/04, 045 58 2004 2004:%i:1076813884 21:58:04</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/a_little_php_help/#p122</guid>
   </item>
   </channel>
</rss