Ruko Posted November 23, 2009 Share Posted November 23, 2009 HELP! How do i make a url like this domain.com/play.php?game=cswd instead of using many php files. Quote Link to comment Share on other sites More sharing options...
oni-kun Posted November 23, 2009 Share Posted November 23, 2009 You can have code like if ($_GET['game']=='game1') { echo "<embed game1../>"; }elseif (.....) { echo "Game2: <embed...>"; } in successive IF statements like that, or use a database. Quote Link to comment Share on other sites More sharing options...
iversonm Posted November 23, 2009 Share Posted November 23, 2009 Also I would just like to say you should read stickies. It specifically says do not title your posts as "help". Quote Link to comment Share on other sites More sharing options...
onlyican Posted November 23, 2009 Share Posted November 23, 2009 You also have the SWITCH option switch($_GET["game"]){ case "game1": echo "<embed game1../>"; break; case "game": echo "<embed game2../>"; break; default: //Capture any failed statements. echo "no game found"; } 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.