Well, there are more ways. I'll show you what's the simplest, some will be true code, some will be pseudo code.
Links should be done like this:
HTML Code:
<a href="./index.php?display=main">Main</a>
<a href="./index.php?display=pictures">Pictures</a>
<a href="./index.php?display=news">News</a>
Now, i suppose you have divided page into several <div>s where menu and stuff will be displayed.
Now, you see those "display" in the links, eh? Now we'll catch those in php
PHP Code:
if (isset($_GET['display'])) //we don't want to get warnings in php :P
$display = addslashes($_GET['display']); //we don't want broken pages because someone decided to change the URL manually :P
else
$display = "";
switch($display) //here we take proper page from the database called "pages"
{
default: $query = 'SELECT * FROM pages WHERE name = "main"'; break;
case "main": $query = 'SELECT * FROM pages WHERE name = "main"'; break;
case "pictures": $query = 'SELECT * FROM pages WHERE name = "picture"'; break;
case "news": $query = 'SELECT * FROM pages WHERE name = "news"'; break;
}
$result = mysql_query($query);
$row = mysql_fetch_array($result);
//now we simply take stuff from database array and put to HTML form
echo '<div class="header">HEADER STUFF</div>';
echo '<div class="menu">'.stripslashes($row['menu']).'</div>';
echo '<div class="content">'.stripslashes($row['content']).'</div>';
echo '<div class="footer">FOOTER STUFF</div>';
Now, if you want to put your page to database you'll still need to know some HTML stuff. And adding news to your web page would still require aditional HTML and PHP forms.
That was the most simple template that would have to be updated a lot to be really useful in RL. For my news scripts require another database table where news are stored, because usually you need news title, date, content, some links and more to make an "article".
Pictures and galleries, for those i've used 2 database tables. One with stored gallery names and other with indexed pictures, in another script i've used 3, one for names and information about gallery, pictures were indexed in special folders, so i didn't need one for that and 2 more tables for comments and ratings.
Making a web page isn't all that easy as it seems, specially if you want job well done.
If you require more help, well, just post, i think i'll be quite regular visitor in this section :P