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!

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':
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.