Jump to content

lyall

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Posts posted by lyall

  1. I am trying to use the these functions to create a PHP navigation system, I am using ajax to load the content instantly without having to refresh the whole page but I don't think that is casuing any problems...

     

    This is the piece of script I am using:

     

    <?php switch($id) { default: include('index.php');
    break; case "1": include('contact.php');
    break; case "2": include('blah2.php');
    break; case "3": include('blah3.php');
    break; case "4": include('blah4.php');
    break; case "5": include('blah5.php');
    break; case "6": include('blah6.php');
    break; case "7": include('blah7.php');
    } ?>

     

    And I am using index.php?id=contact to set the variable so that the page loads.

     

    This is the error message I get when attempting to run my script:

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 200

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 201

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 202

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 203

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 204

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 205

     

    Notice: Undefined variable: id in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/index.php on line 206

     

    I don't understand.

     

    I know this is problem a pretty noobish problem to you coders, im still trying to grasp PHP and I apppreciate your help.

     

  2. Ok I am using this code for my php navigation script:

    [code]<?
    if (isset($_GET['page']) && isset($_GET['id']) && file_exists('mods/'.$_GET[id].'/'.$_GET[page].'.php')) {
    include 'mods/'.$_GET[id].'/'.$_GET[page].'.php';
    }
    else {
    echo "Page Not Found";
    }
    ?>[/code]

    And it requires me to have a mods folder on my server and then any folders and filse inside this /mods folder is included in my frame and thats how the site works.

    But I have installed a news script and its all working good but when you click comments it opens in a new window and the comments file is in another directory, is there anyway I can get the comments to display in my site frame.

    If you go to this url [color=red]http://media.bloodyrandom.com/funkrush/index2.php?id=pages&page=newsupdates[/color] you will see what I mean, click on view comments(3), (http://media.bloodyrandom.com/funkrush/news/examples/siteupdatesdisplay.php?action=viewcomments&newsid=1)
    This is the page I need included in the frame.

    PS nobody knows about this site its currently under construction and its going to rock when it comes out so please dont go posting this link around :)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.