gmz1023 Posted July 18, 2009 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 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
Archived
This topic is now archived and is closed to further replies.