[thelist] PHP to insert press Releases into a detail page

JYoung at sawgrassink.com JYoung at sawgrassink.com
Fri Sep 23 08:54:58 CDT 2005


I do not know a lot about PHP, but I think it is a good solution for
this?

 

I have about 40 press releases that are part of a site redesign.  The
current HTML is bloated with <font> and <table> tags.  In addition to
the code bloat, the press releases page is actually a very long page
that is linked to using anchor links from a main Press Release page list
of links.  There are about 15 articles on one PR page.  I want to put
each PR on it's own page, but I do not want to "copy and paste"/"save
as" each new press release page.

 

Is it possible to copy the current articles into a text file, and then
use PHP includes to drop in the appropriate article depending on the
link that is click by the user?  In other words, if the use clicks on
the first linked press release from the main PR index page; how can I
use PHP includes on the article detail page to feed in the appropriate
press release article? 

 

I have use a PHP include to insert a contact form into an HTML page
before, but this is a bit different.  I am looking for the easiest, most
efficiently simple solution of course.

 

 

Index page:

Press release one <-- Click this & the article appears in the
"press-releases" div on the detail page.

Press release two

Press release three

Press release four

 

Detail page:

<div id="press-releases">

<h1>Press release one</h1>

<p>press release one article text goes here</p>

</div>

 

I'm guessing the "Press release one" link would call a PHP include
(somehow?) and then that include would insert the test into the
"press-release" div...somehow?  This seems pretty simple, anyone have
any suggestions or examples.  Again, I am totally new to PHP.

 

Thanks



More information about the thelist mailing list