0

Here is how you get a variable name for a get statement

By link: http://www.example.com/index.php?foldername

By form:

<form method="get" action = "">
    <input type="text" name ="adsda" />
</form>


<?php
foreach ($_GET as $name => $val)
{
     echo htmlspecialchars($name . ': ' . $val) . "\n";
}
?>

How can you get a name from a directory name in PHP?

http://www.example.com/foldername1
http://www.example.com/foldername2

Can you do it without creating folders? (For example if someone did this for searching something)

Sol
  • 949
  • 1
  • 11
  • 23
  • 1
    another good way: https://stackoverflow.com/questions/48310091/rewrite-a-non-existent-directory-name-to-a-file – danilo Feb 25 '18 at 02:46
  • Your comments helped me find this https://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess/ – Sol Feb 25 '18 at 03:26

0 Answers0