gmz1023 Posted July 18, 2009 Report Share Posted July 18, 2009 Hey y'all,i'm working on a website right now and i have a quick question about PHP.so lets say i have a code like thisCODE<?php$cmd = $_GET['cmd'];switch($cmd){case "page1":@include('page1.php');break;case "page2":@include('page2.php');break;case "page3":@include('page3.php');break;}?>and i want to make it so that instead of having to program the codes for the websites in manually it would just go off of the link it self, how would i do that? Link to comment Share on other sites More sharing options...
Synook Posted July 19, 2009 Report Share Posted July 19, 2009 $cmd = some_sanitize_function($_GET['cmd']);include($cmd.php); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now