0

Hey everyone. I'm trying to create a webpage where everything you click, it reloads in the main content div with the new page. Heres an example of what im talking about.

This is my main content.

<?php
    switch ($Content)
    {
        case register:
            echo "<a href=\register.php</a>";
            break;
        default:
            echo "Welcome to our online game!";
    }
?>

And this is the link that would go to the register page.

<tr><td colspan="2" align="left"><br>Not registered? <a href="<?php echo $_SERVER['PHP_SELF']; ?>?Content=register">Sign-Up!</a></td></tr>

I know I'm not implementing the switch/case statement correctly (otherwise it would be working lol) But if someone could show me how to make it reload the center div on each click?? Thanks!

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Barefootsanders
0

Does the server you are working on have register_globals = on ? If not (and its more secure if register_globals is off) then you will need to get the $content variable like so:

$Content = $_GET['Content'];

also register should be in quotes like so:

case 'register':
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.