hi folks,
i'v been searching the forum, got an answer but was curious if there was another way...
i got a form, with a textfield, and i want to check if that field is an integer. The is_int() function don't work, because it is a text field, so it always return a string.
What was proposed on the message a read is to use ereg like that :
if (ereg("-?[0-9]+$", $YOUR_TEST))
{
echo ("is and integer");
}
else
{
echo ("is not an integer");
}
And then the sender ask if there wouldn't be another way of doing that and nobody answer so...
someone got an idea?
thanx in advance,
Jacinthe