Beginner here:
Doing a search in php to a mysql database.
What code can I add to check to make sure that the input from the form is only numerals, no text characters ?
I found using:
if (!eregi("[[:alpha:]]", $search_query))
{
echo "Error: you have entered an invalid query, you can only use characters!<br>";
exit;
}
would do it for for text, but what is it for numerals ?
Thx