Jump to content

Recommended Posts

Yes you can do it. You will still have to make both pages

you will have to have at least one page show. like

[a href=\"http://site.com/index.php?page=games\" target=\"_blank\"]http://site.com/index.php?page=games[/a]

The on the index page all you need to do is include the page

index.php
[code]<?
include(''.$_GET['page'].'.php');
?>[/code]

Ray
[!--quoteo(post=359800:date=Mar 29 2006, 03:29 PM:name=craygo)--][div class=\'quotetop\']QUOTE(craygo @ Mar 29 2006, 03:29 PM) [snapback]359800[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Yes you can do it. You will still have to make both pages

you will have to have at least one page show. like

[a href=\"http://site.com/index.php?page=games\" target=\"_blank\"]http://site.com/index.php?page=games[/a]

The on the index page all you need to do is include the page

index.php
[code]<?
include(''.$_GET['page'].'.php');
?>[/code]

Ray
[/quote]


im not really understanding what your trying to say
$_GET is a global array that grabs information out of the URL. If someone goes to your site or clicks on a link from your site with the following address: "mysite.com/index.php?page=123" then you're going to find "123" in the variable: $_GET['page'].

So in your index page, you need to handle that:

[code]<?php
if(isset($_REQUEST['page']))
{
    switch($_GET['page'])
    {  
          case "123":
                include("page123.php");
          break;
          case "foo":
                include("foobar.php");
          break;
}
else
    include("main.php");
?>[/code]

Does that help? Also, please do not bump your thread 12 minutes after posting a question. Someone will get to it.
[!--quoteo(post=359804:date=Mar 29 2006, 03:35 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 29 2006, 03:35 PM) [snapback]359804[/snapback][/div][div class=\'quotemain\'][!--quotec--]
$_GET is a global array that grabs information out of the URL. If someone goes to your site or clicks on a link from your site with the following address: "mysite.com/index.php?page=123" then you're going to find "123" in the variable: $_GET['page'].

So in your index page, you need to handle that:

[code]<?php
if(isset($_REQUEST['page']))
{
    switch($_GET['page'])
    {  
          case "123":
                include("page123.php");
          break;
          case "foo":
                include("foobar.php");
          break;
}
else
    include("main.php");
?>[/code]

Does that help? Also, please do not bump your thread 12 minutes after posting a question. Someone will get to it.
[/quote]

im not really understanding on how i can link this code to my links
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.