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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

<?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.
Link to comment
Share on other sites

<?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

Link to comment
Share on other sites

<?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.

Link to comment
Share on other sites

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.