PHP Dynamic Link

superblobals – php has built in superglobals variables that we can use to create a fully dynamic link. Superglobals are always available in all scopes

                $_SERVER[‘PHP_SELF’];       

          $_SERVER[‘SERVER_NAME’];

The above 2 superglobals are just a couple of examples of the built in variables, we can use to help us build a dynamic link. If you are using them in a form to get information from the user, you will need to run some security checks.

For more information check:

https://www.php.net/manual/en/language.variables.superglobals.php


demo

  • PHP
  • Includes: index.php and CSS file

next

Please check for future updates here or at my gitHub page.