PHP URL Parameter Processing

Some test URLs

  1. year=2018
  2. year parameter defined but without value - no error but the value is empty
  3. without year parameter- this will generate an error

The year parameter from the URL is not set.


Notice: Undefined index: year in C:\home\site\wwwroot\examples\php-input\url-get.php on line 23

The year parameter from the URL is empty.


Notice: Undefined index: year in C:\home\site\wwwroot\examples\php-input\url-get.php on line 27

The year parameter from the URL: