Thanks for help on my first post about the glossary entries guys. I've run into a bigger problem on the same topic though. (Forget anything I said in the last post, this is a separate point).
OK, here's the deal: I've got a page with hundreds of technical terms on it, and I want each term to link to a glossary
entry on a separate page.
That would be simple, except I want the printed data of each glossary entry to be a small file which will be accessed by a
'php include' from a template page called 'glossarytempla te.php'. 'glossarytempla te.php' has loads of other includes for
menus, java scripts, changeable graphics, roll-over messages etc, so to make a perfectly formatted page for each glossary
entry with all the necessary includes would be dangerous, as changing my mind about any presentation or structure would
result in a nightmarish update process.
Here's an example of my code from the page containing the article with all the technical terms:
<a <?php $entry == $augmented; ?> href="glossaryt emplate.php">au gmented</a>
My theory was that clicking on the word 'augmented' would assign equate $augmented with the string $entry, and that I
would use $entry on the glossarytemplat e.php page, thus:
<?php
$no_data = "<p>This definition is coming soon. Please check back later.</p>";
if ($entry == $augmented) {include ("glossaryda ta/augmented.html" );}
elseif ($entry == $tritone) {include ("glossaryda ta/tritone.html"); }
elseif ($entry == $kurchatov) {include ("glossaryda ta/kurchatov.html" );}
else
{echo $no_data;}
?>
It seems, however, that the value of $entry won't be carried over to another page. Any solutions?
A bigger problem (and one which may render all the above void), is that my 'elseif''s will run into the hundreds using this method. Is there a command for rendering something equivalent to the following plain-English?
{include ("glossaryda ta/the name of the file that's in the $entry string.html");}
Thanks a lot,
fructose
OK, here's the deal: I've got a page with hundreds of technical terms on it, and I want each term to link to a glossary
entry on a separate page.
That would be simple, except I want the printed data of each glossary entry to be a small file which will be accessed by a
'php include' from a template page called 'glossarytempla te.php'. 'glossarytempla te.php' has loads of other includes for
menus, java scripts, changeable graphics, roll-over messages etc, so to make a perfectly formatted page for each glossary
entry with all the necessary includes would be dangerous, as changing my mind about any presentation or structure would
result in a nightmarish update process.
Here's an example of my code from the page containing the article with all the technical terms:
<a <?php $entry == $augmented; ?> href="glossaryt emplate.php">au gmented</a>
My theory was that clicking on the word 'augmented' would assign equate $augmented with the string $entry, and that I
would use $entry on the glossarytemplat e.php page, thus:
<?php
$no_data = "<p>This definition is coming soon. Please check back later.</p>";
if ($entry == $augmented) {include ("glossaryda ta/augmented.html" );}
elseif ($entry == $tritone) {include ("glossaryda ta/tritone.html"); }
elseif ($entry == $kurchatov) {include ("glossaryda ta/kurchatov.html" );}
else
{echo $no_data;}
?>
It seems, however, that the value of $entry won't be carried over to another page. Any solutions?
A bigger problem (and one which may render all the above void), is that my 'elseif''s will run into the hundreds using this method. Is there a command for rendering something equivalent to the following plain-English?
{include ("glossaryda ta/the name of the file that's in the $entry string.html");}
Thanks a lot,
fructose
Comment