I am writing a script, and i seem to be running into some trouble with the template script. It will only display one of the included pages even when I request a different page. to request a page I use this format: admin.phtml?page=edit
I have enclosed the code to the page below.
<?php
Print("\n");
Print("<HEAD>\n");
Print("<TITLE>News Admin</TITLE>\n");
include("/path/to/292/include/style.inc");
include("/path/to/292/include/db_functions.inc");
Print("</HEAD>\n");
Print("<BODY>\n");
//Set page variables
//$page = '0';
$news_root = "/path/to/292/include/news";
//Connect to database
mysql_pconnect($hostname, $user, $password) or die("There is something worng with the connect info or the server " . mysql_error());
mysql_select_db("burwell");
if ($page = add)
{
include "$news_root/add_news.inc";
}
elseif ($page = edit)
{
include "$news_root/edit_news_table.inc";
}
elseif ($page = delete)
{
include "$news_root/delete_news.inc";
};
Print("</BODY>\n");
Print("\n");
?>