Answer the question
In order to leave comments, you need to log in
Should the form handler (PHP file) be protected from direct access?
Good time of the day.
There is a simple form.
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="John">
<br>
Last name:<br>
<input type="text" name="lastname" value="Doe">
<br><br>
<input type="submit" value="Submit">
</form>
Answer the question
In order to leave comments, you need to log in
There is no "indirect" access to form handlers. Access is always direct.
There are no separate special form handlers. Your handler is a regular php script, just like all the others. And you need to protect it no more and no less than other scripts.
Therefore, you need to throw these fantasies out of your head and do something useful.
If there are problems with the Internet connection on the server or the site crashes, when the key may appear in the error text. For reliability, turn off the output of all errors
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question