Tuesday 24 December 2019

html - PHP Undefined Index

This is going to sound really stupid, but I cannot figure out why I am getting this error.


I have created a selection box, named "query_age" in my html form:





In the corresponding php form, I have:


$query_age = $_GET['query_age'];

When I run the page, I get this error:



Notice: Undefined index: query_age in index.php on line 19



I don't understand why this is happening, and I'd love to know how to make it go away.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...