Posted by Thejo on 11/11/65 11:28
Hi all,
I started programming in PHP recently and have a query about empty
$_POST arrays. I can see two scenarios when this could happen.
1. When some tries to directly load the page to which data is being
posted (for example, opening www.foo.com/xyz.php directly when a form
action is xyz.php)
2. When the user clicks the submit button without entering anything.
I am aware that Javascript validation can take care of the second case,
but it's unreliable. What is the accepted way of handling the above
situations on the server side?
Do I just reload the calling page if the array is empty?
Thanks,
Thejo
[Back to original message]
|