But doesn't that mean I have to go update every single page each time a new keyword for a link is added? Or is there a way in PHP to make it do that automatically?
I'm a little confused here.
If you change all the pages to PHP (a simple matter of renaming the files to .php, it is not even necessary that the file has PHP code in it for it to display properly), then you can progressively insert more and more dynamics into each page.
If every page needs to link to a certain part of your website whose address might change, then on each of the pages in your website, you'd add this:
<?php
//code to grab a URL from MySQL and put it in $url_to_area1
//code to grab a URL from MySQL and put it in $url_to_area2
?>
<html>
.
.
. (normal website here)
.
.
.
<a href="<?php echo $url_to_area1; ?>">Click here</a> to go to Area 1.
<a href="<?php echo $url_to_area2; ?>">Click here</a> to go to Area 2.
</html>
?>
If you have a certain group of an unknown number of links that will be displayed as a cluster or maybe an html table, then you could do a slightly more advanced PHP script like so:
<?php
//code to grab the global list of all the dynamic links from MySQL
//read it into an array $glob_links, then read the global list of
//descriptions FOR the dynamic links from MySQL and read it into
//the array $glob_links_desc
reset($glob_links_desc);
i=0;
echo "<table><tr>";
foreach ($glob_link as $gl) {
i += 1;
echo "<td><a href=\"".$gl."\"><b>".$glob_links_desc[i]."</b></a></td>";
}
echo "</tr></table>";
?>
You could also have a whole chunk of each page that is dynamic.
To do this, you'd have your ordinary HTML pages renamed to *.php and then insert code in there.
<html>
<head>
.
.
.
.
<?php include "dynamiclinks.php"; ?>
.
.
.
</html>
Then if you change the contents of dynamiclinks.php, everywhere it is displayed (all the other pages), it will be up-to-date.