I made an html file called test.html then I navigated to it as ‘http://site.com/test.html?test1=a‘ but the textbox stayed blank. Why is this?
Super simple code
<html> <head> <title>Test</title> </head> <body > <input type=text name='test1'> </body> </html>
The file should be a PHP file, so test.php.
Then maybe something like this:
The reason it stays blank in your example is because there is no PHP code to put the value into the field. It isn’t automatic. Also, on most servers (but not always), a file with an .html extension will not be parsed by PHP.
Also, passing it to the htmlspecialchars function will help prevent cross-site scripting.