gamemaker Posted April 7, 2007 Share Posted April 7, 2007 If you go to some site like http://glaielgames.com/games.php And when you click to play a game it pops up with a link like http://glaielgames.com/play.php?id=5 How would I do this on my site? Thanks Quote Link to comment Share on other sites More sharing options...
clown[NOR] Posted April 7, 2007 Share Posted April 7, 2007 Read this: http://no.php.net/manual/en/function.include.php Quote Link to comment Share on other sites More sharing options...
jscix Posted April 7, 2007 Share Posted April 7, 2007 This works if you use it as, http://www.example.com?id=filename (solong as the file is .php) <?php $srcontent = "".stripslashes($_GET['id']).".php"; if(!file_exists($srcontent)){ die("File does not exist"); } else { include($srcontent); } ?> 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.