Ok ive got a form and ive made it where you have to enter in data if the text boxe's
before you can submit the form to a database. BUT i need some help i need to make it where in certain field the users can only enter in letters in some text boxes but in other textboxes they can only enter in numbers. i found this code
<?php
$strings = array('AbCd1zyZ9', 'foo!#$bar');
foreach ($strings as $testcase) {
if (ctype_alnum($testcase)) {
echo "The string $testcase consists of all letters or digits.\n";
} else {
echo "The string $testcase does not consist of all letters or digits.\n";
}
}
?>
so lets say i got a text box called $_POST[phonenumber] and i want to make sure only numbers were intered into the box. What would i change the code to?😕 😕 😕