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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Menu without refreshing

    Ok im trying to add in my site a php menu without the refreshing parts where it just adds the news parts of the site in the center ive got this code so far.

    PHP Code:
    <?php
    if (!isset($_GET['p'])) {
        include 
    "index2.php";
    } else {
    switch (
    $_GET['p']) {
        case 
    "home":
             include 
    "index2.php";
        break;
        case 
    "aboutme":
             include 
    "contact.php";
        break;
        case 
    "test":
             include 
    "test2.php";
        break;
        case 
    "forum":
             include 
    "/forum";
        break;
        default:
             include 
    "index2.php";
        };
    }  
    ?>

  • #2
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    In order to have the content change without a page refresh, you'll need to look into AJAX. php, by itself, is not capable of this as php is server-side technology, not client-side.


  •  

    Posting Permissions

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