Jump to content

$_GET And directed/help please


ljzxtww

Recommended Posts

Your index page needs to be something along the lines of....

 

<?

// MAIN PAGE

// Put the pages into variables

$x = $_GET[x];

$plan = $_GET[plan];

if ($x=="reseller")) {

if (empty($plan)) {

include ".some/reseller/page.php";

} elseif ($plan=="mega") {

include "./some/page/to/mega.php";

}  elseif ($plan=="super") {

include "./some/page/to/super.php";

}

} else {

include "./path/to/homepage.php";

}

?>

 

Like I said SOMEthing like that

You will need to create a index.php that can handle the variable you are using.

 

<?php

$files = array(

"home" => "index.php",

"about" => "about.php",

"services" => "simplyrem/services.php"

 

 

);

 

if($_GET['page'] == ""){

}

 

 

if(isset($_GET['page']) && isset($files[$_GET['page']])){

include($files[$_GET['page']]);

} else {

require("simplyrem/index.php");

require_once("libs.inc.php");

 

}

 

?>

 

this is my code in index.php

 

I want the link like this one

 

http://domainname/reseller/mega.php

I want to be this link:

http://domainname/?x=reseller&?&plan=mega

 

 

but voyde  give me the code was wrong

 

I get it

<?php
if (isset($_GET['x'], $_GET['plan']) && file_exists($_GET['x'] . "/" . $_GET['plan'] . ".php")) {
      include($_GET['x'] . "/" . $_GET['plan'] . ".php");
} else {
      // do something else.
}

This will make it so that if you put in say:

/?x=first&plan=second

      you will include the file path

/first/second.php

 

Neither are loading for me.

 

Safari OS X, sorry i can't help.

Well duh, they point to nothing.

<?php
$files = array(
"home" => "index.php",
"about" => "about.php",
"services" => "simplyrem/services.php"


);

if($_GET['page'] == ""){
}
if (isset($_GET['x'] , $_GET['plan']) && file_exists($_GET['x'] . "/" . $_GET['plan'] . ".php")) {
      include($_GET['news']  ,   $_GET['plan'] . "mega.php");
} else
      // do something else.
}


if(isset($_GET['page']) && isset($files[$_GET['page']])){
include($files[$_GET['page']]);
} else {
require("simplyrem/index.php");
require_once("libs.inc.php");
include("reseller/mega.php");

}

?>

 

 

should I put like this:

 

I didnt understand your question righ here:

 

"This will make it so that if you put in say:

/?x=first&plan=second

      you will include the file path

/first/second.php"

 

 

please tell me again

 

thank you

 

larry

<?php
if (isset($_GET['x'], $_GET['plan']) && file_exists($_GET['x'] . "/" . $_GET['plan'] . ".php")) {
      include($_GET['x'] . "/" . $_GET['plan'] . ".php");
} else {
      // do something else.
}

This will make it so that if you put in say:

/?x=first&plan=second

      you will include the file path

/first/second.php

 

Neither are loading for me.

 

 

 

solve the problem thanks a lots

 

if I have problem I tell you

 

 

thank you

 

larry pappas

 

Safari OS X, sorry i can't help.

Well duh, they point to nothing.

Archived

This topic is now archived and is closed to further replies.

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