Bradley99 Posted January 15, 2011 Share Posted January 15, 2011 Hi, (Just wanna say thanks to the guy who helped me earlier as i cannot find the topic) I have a game, it has 3 frames, menu, header & the main content, it WAS fine until i deleted a 4th frame, now when i click a link from the menu, instead of showing the link in the 'Main' content area, it takes you to the actual page with no menu, header etc. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/ Share on other sites More sharing options...
Bradley99 Posted January 15, 2011 Author Share Posted January 15, 2011 Just to clarify, i know a few methods but they mean going into every page that would be in the main section and adding script, i have around 50/60 pages on the site so i was looking for an easier method, the code is no different from my other site so i cannot see why it has changed. Here is the game.php frame script. <?php session_start(); include_once"eng/includes/db_connect.php"; $username=$_SESSION['username']; $query3=mysql_query("SELECT * FROM user_info WHERE username='$username'"); $fetch3=mysql_fetch_object($query3); $lang = $fetch3->lang; if($lang == "Turkish"){ $langurl="tr"; }else{ $langurl= "eng"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Frames</title> </head> <frameset border="0" frameborder="0" framespacing="0" rows="92,499" cols="*"> <frame src="<? echo "$langurl"; ?>/banner.php" scrolling="no" marginwidth="10" marginheight="10" id="banner" /> <frameset border="0" frameborder="0" framespacing="0" rows="*" cols="92,499"> <frame src="<? echo "$langurl"; ?>/menu.php" scrolling="auto" marginwidth="10" marginheight="10" frameborder="0" noresize="noresize" id="menu" /> <frame src="<? echo "$langurl"; ?>/you_stats.php" scrolling="auto" marginwidth="10" marginheight="10" frameborder="0" noresize="noresize" id="main" /> </frameset> </frameset> <noframes><body><p>Your browser doesn't support Frames, please use a more modern one.</p></body></noframes> </html> Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159628 Share on other sites More sharing options...
dragon_sa Posted January 15, 2011 Share Posted January 15, 2011 need to see your menu.php page thats the one calling your links Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159640 Share on other sites More sharing options...
trq Posted January 15, 2011 Share Posted January 15, 2011 Hi, (Just wanna say thanks to the guy who helped me earlier as i cannot find the topic) There is a link to your own threads within your profile. http://www.phpfreaks.com/forums/profile/?area=showposts;u=108567 Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159644 Share on other sites More sharing options...
Bradley99 Posted January 15, 2011 Author Share Posted January 15, 2011 Thanks Thorpe Heres some of the menu.... tr> <th onClick="Menu.toggle(this);" id="">Game</th> </tr> <tr> <td> <div class="subnav" style="display: ;overflow: hidden;"> <table cellpadding="0" cellspacing="0"> <tr><td><a class="menuLink" href="./you_stats.php" onMouseDown="return false;" target="main">My Stats</a></td></tr> <tr> <td><a class="menuLink" href="countrys.php" onMouseDown="return false;" target="main">Countries</a></td> </tr> <tr><td><a class="menuLink" href="./bank4.php" onMouseDown="return false;" target="main">Bank</a></td></tr> <tr><td><a class="menuLink" href="./buy.php" onMouseDown="return false;" target="main">Shop/Market</a></td></tr> <tr><td><a class="menuLink" href="./fly.php" onMouseDown="return false;" target="main">Travel</a></td></tr> Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159650 Share on other sites More sharing options...
dragon_sa Posted January 15, 2011 Share Posted January 15, 2011 add the name tag to your main frame name="main" and try that Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159658 Share on other sites More sharing options...
Bradley99 Posted January 15, 2011 Author Share Posted January 15, 2011 Much appreciated, i was using id: rather than name: woops! Quote Link to comment https://forums.phpfreaks.com/topic/224488-php-pages-in-files/#findComment-1159830 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.