ljzxtww Posted February 29, 2008 Share Posted February 29, 2008 Hi guy: I need the link look like this HI can you help me lilttle bit more please http://domainname/reseller/mega.php I want to be this link: http://domainname/?x=reseller&?&plan=mega please somebody help me larry pappas Quote Link to comment Share on other sites More sharing options...
hawkenterprises Posted February 29, 2008 Share Posted February 29, 2008 You will need to create a index.php that can handle the variable you are using. Quote Link to comment Share on other sites More sharing options...
unsider Posted February 29, 2008 Share Posted February 29, 2008 Neither are loading for me. Safari OS X, sorry i can't help. Quote Link to comment Share on other sites More sharing options...
voyde Posted February 29, 2008 Share Posted February 29, 2008 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 Quote Link to comment Share on other sites More sharing options...
ljzxtww Posted February 29, 2008 Author Share Posted February 29, 2008 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 Quote Link to comment Share on other sites More sharing options...
ljzxtww Posted February 29, 2008 Author Share Posted February 29, 2008 help me with this Quote Link to comment Share on other sites More sharing options...
conker87 Posted February 29, 2008 Share Posted February 29, 2008 <?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. Quote Link to comment Share on other sites More sharing options...
ljzxtww Posted February 29, 2008 Author Share Posted February 29, 2008 <?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 Quote Link to comment Share on other sites More sharing options...
ljzxtww Posted February 29, 2008 Author Share Posted February 29, 2008 <?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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.