I’m trying to skip having TWO files for PHP form validation and processing using a target of $_SERVER[“PHP_SELF”] in the action specification.
Of course, for security, it’s a little more sophisticated, using:
<form method="post" action='<?php echo
htmlspecialchars($_SERVER["PHP_SELF"]);?>'>
Example code and more is readily found at the w3Schools.com site, such as this example, but one of many. And yes, I’ve got that very one on my site now, and it has visible issues, though this command shows no errors:
$ php -l index.html
No syntax errors detected in index.html
No matter what I try, it just doesn’t work on my systems?! In reading the literature it seems perfectly reasonable, why you’d want to do this, how to secure it, all known and I’d guess I’ve used countless sites that do this very thing on places I’ve interacted with in the past since they don’t move me to another page upon posting.
My guess is it has something to do with the voluminous permissions PHP has at hand. I dug through them and found nothing obvious; anyone?
I can of course give lots of platform data but then, if this is caused by a specific permission, that may be immaterial.