[EMAIL PROTECTED] wrote:
if((eregi("[^a-zA-Z0-9]",$GP[sifre])
I think that the ^ anchor is your problem, it shall be out of the brackets :
if (eregi("^[a-zA-Z0-9]+$", $GP['sifre'])) echo 'true';
else echo 'false';
(the above is tested and works perfect)
P.S. Take a look here
http://www.php.net/man
[EMAIL PROTECTED] wrote:
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:
Try this:
if(eregi("^[a-zA-Z0-9]+$",$GP[sifre]))
The above say that between the beginning of the string "^" and the end
of the string "
On Mon, 22 Apr 2002, Gregor Jaksa wrote:
> if (!eregi("^[[:alpha:]]$", $HTTP_POST_VARS["vpis_ime"]))
> echo "wrong char";
>
> why does this always return "wrong char" no matter what value is in vpis_ime
> ... i tried "blah", "242234" "bla242h" .. every single time i get "wrong
> char". im using
Try:
if (!eregi('^[a-z_\-]{0,}$', $_POST['vpis_ime']))
echo "wrong char";
That'll sort it for everything except [ and ], which I can't find any way of
checking for :-( Anyone else have any ideas?
HTH anyway.
Danny.
- Original Message -
From: "Gregor Jaksa" <[EMAIL PROTECTED]>
To: <[
4 matches
Mail list logo