I have some code for my game I'm rewriting and making it a frames based game but the old code doesn't help I have included this piece of code to ask how I could make it go to the target frame within the frame set and not have to change all my links and basically rewrite the whole game. Here is the code
if (!in_array($_GET['show'], $accepted)) //$accepted is the array of all accepted page names
{
echo "That page does not exist";
}
else
{
// navigation pages for the town
if($_GET['show'] == "account" || $_GET['show'] == "alley_man" || $_GET['show'] == "alley_view" || $_GET['show'] == "archer" || $_GET['show'] == "armor" || $_GET['show'] == "bank" || $_GET['show'] == "chat" || $_GET['show'] == "cloth" || $_GET['show'] == "crimson" || $_GET['show'] == "garden" || $_GET['show'] == "inn" || $_GET['show'] == "mage" || $_GET['show'] == "main" || $_GET['show'] == "merchant" || $_GET['show'] == "weapons" || $_GET['show'] == "recovery_room")
{
require_once("dungeons/town/" . $_GET['show'] . ".php");
}
I'm trying to make this easier but it seems it would be a hard thing for me to rewrite the game but a friend on here said my game would be good with a front controller but I have no knowledge how to do that. I am not sure if a frames based game would help achieve that?? Anyway any help would be appreciated!!
Thanks,