...

View Full Version : Php linking? - Not working



Keanu
03-13-2008, 03:26 AM
Okay.. what i've got is.. my index.php has a iframe in it...

This is the code:


<iframe src="iframe.php" name="FRAME" width="675" height="300" frameborder="0"></iframe>


And this is what my links are:



<a href="iframe.php?page=Information" target="FRAME"> (Image here)


Now, whenever I go to said page... it doesn't even change the page.. This is whats in my iframe.php



<?PHP
if($page == "News") { include('cutenews/show_news.php'); }
elseif($page == "Information") { include('information.html'); }
elseif($page == "Downloads") { include('downloads.html'); }
elseif($page == "Team") { include('theteam.html'); }
else { include('cutenews/show_news.php'); }
?>


Now.. Can anyone explain to me why that isn't changing page? The code looks fine..


http://ro.aro-network.co.uk
is my site..?

Take a look if you wish, its just doing my nut in because I don't understand why it isn't changing page?

Thanks in advance!
-Keanu

mlseim
03-13-2008, 04:09 AM
<?PHP
// Get variable from the URL
$page=$_GET['page'];

if($page == "News") { include('cutenews/show_news.php'); }
elseif($page == "Information") { include('information.html'); }
elseif($page == "Downloads") { include('downloads.html'); }
elseif($page == "Team") { include('theteam.html'); }
else { include('cutenews/show_news.php'); }
?>

Keanu
03-13-2008, 05:16 AM
Works brilliant, thanks!

Thankkk you!!!
-Keanu

p4plus2
03-13-2008, 05:57 AM
Though what he said works I have a small tip for you.

DONT USE FRAMES.

They can be nice and clever so you would think, however they are very good at messing up spiders crawling in your site for search engines. Since framed pages cant be added to the list of pages in google, you lose page ranks. However, feel free to use them....I'm just giving you a heads up :)

Keanu
03-14-2008, 03:06 AM
I don't really want my pages crawled... Sure i'd like more hits, but i'm on a topsite, so it doesn't really matter in the end...

Thanks for the advice though!
-Keanu

oesxyl
03-14-2008, 06:48 AM
Though what he said works I have a small tip for you.

DONT USE FRAMES.

They can be nice and clever so you would think, however they are very good at messing up spiders crawling in your site for search engines. Since framed pages cant be added to the list of pages in google, you lose page ranks. However, feel free to use them....I'm just giving you a heads up :)

this is not true. The improper use of frame make this happend but the same thing applay if you use a lot of links at the begining of the page and nobody don't say "don't use links", :)

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum