forumnz Posted December 9, 2007 Share Posted December 9, 2007 I saw a website and it had a URL like example.com/subdir/?option=something Is it basically like example.com/subdir/index.php?option=something ? Thanks, Sam. Link to comment https://forums.phpfreaks.com/topic/80829-solved-how-does-this-work/ Share on other sites More sharing options...
phpQuestioner Posted December 9, 2007 Share Posted December 9, 2007 it uses the "option" variable to send a query string to the "index.php" page. basic example (put this in your "index.php" to see results): <?php $option1 = $_GET['option']; echo "$option1"; ?> you can use the string variable and value for multiple php purposes. Link to comment https://forums.phpfreaks.com/topic/80829-solved-how-does-this-work/#findComment-410058 Share on other sites More sharing options...
Northern Flame Posted December 9, 2007 Share Posted December 9, 2007 because when you access a index file you do not need to type in the index and extension just as website.com/subdr/ is the same as website.com/subdr/index.php .... Link to comment https://forums.phpfreaks.com/topic/80829-solved-how-does-this-work/#findComment-410067 Share on other sites More sharing options...
revraz Posted December 9, 2007 Share Posted December 9, 2007 Depends on the webhost and how you have your default pages setup. Link to comment https://forums.phpfreaks.com/topic/80829-solved-how-does-this-work/#findComment-410069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.