Hello all,
I realize that there have been a number of threads posted on this subject, as I have reviewed many of them. However, I am attempting to use a regualr expression, and cannot get it to function properly.
What I want to do is to check a strings value to make sure that it only contains numbers and nothing else. If it does contain any other characters, than I want to provide a message to the user.
Here is the code that I am using:
elseif (!ereg("[0-9]", $opp_amount))
{
echo "<li class=\"regular\"><b>Revenue</b><br>Amounts for the Revenue field can only contain numbers.</li>";
}
Any assistance would be greatly appreciated.