I have a relatively simple question.
Will using PHP guarantee that a form is always validated in the manner that was coded using PHP?
This being... If you do something like:
if (strlen($_POST['myInput'] == 0)
{
Do this...
}
Will it apply no matter what client the user is making use of? E.g. IE, Firefox, Mobile Devices (Blackberry, Samsung), Linux Browsers?
The reason I ask this is because I fail to see the point in applying html validations like pattern
at all.
Any input regarding this would be greatly appreciated. Thank you!
EDIT:
if (!preg_match("#^([0-9 ]{10,13})?$#", $_POST['myInput']))
{
// Apply error pointers
$_SESSION['myInputError'] = 'class="badInput" autofocus="autofocus"';
include "$docRoot/html/forms/reg/user_info.html.php";
exit();
}