Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Php linking? - Not working

    Okay.. what i've got is.. my index.php has a iframe in it...

    This is the code:
    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 Code:
    <?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..

    Code:
    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

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    <?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'); }
    ?>

  • Users who have thanked mlseim for this post:

    Keanu (03-13-2008)

  • #3
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Works brilliant, thanks!

    Thankkk you!!!
    -Keanu

  • #4
    Regular Coder
    Join Date
    Mar 2008
    Posts
    103
    Thanks
    1
    Thanked 8 Times in 8 Posts
    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

  • #5
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #6
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by p4plus2 View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •