Greetings again,
I just thougtht I would update you all to the progress being made in my endeavors. I almost have this working 100% but I still need a little bit of help.
I redid my entire code. At the beginning of my page I have this code:
error_reporting(E_ALL); // for debugging
$page = 1; //this is the first section
$dbhost = 'xx';
$dbuser = 'xx';
$dbpass = 'xx';
$dbname = 'xx';
Then my code has the HTML part of the page and everything for my menu and so forth.
In my content area I have this code:
$db = mysql_connect("$dbhost","$dbuser","$dbpass");
mysql_select_db($dbname,$db);
if ($page == 1)
{
echo 'Main index<br />';
//displays the title on top of page
$requete = "SELECT * FROM Main WHERE Section='index'";
}
else if ($page == 2) {
echo 'History<br />';
//displays the title on top of page
$requete = "SELECT * FROM Main WHERE Section='history'";
}
else if ($page == 3) {
echo 'What is Flock?<br />';
//displays the title on top of page
$requete = "SELECT * FROM Main WHERE Section='what is flock'";
}
$result = mysql_query ($requete,$db);
$row = mysql_fetch_array($result);
echo ($row['phpfile']);
Currently it works fine if I manually set the $page variable to 1, 2, or 3 at the top of the page in the first section of code I posted. If I change that to 2 or 3 it will change what is displayed.
But what I am trying to accomplish now is getting that to change when I click on a link. My links right now are in the format of: "template3.php?page=1"
How do I get PHP to change the $page variable from 1 to 2 or 3 by clicking on the link?
Thanks for any help provided.