A
Anonymous
Guest
Hi,
I have a text field, and I need help to make something that will check character by character if its 1-2-3-4-5-6-7-8-9-0, no * ( ) - = + or letters.
I know the function preg_match and is_numeric but I think i don't use them correctly because it's not working.
if (preg_match("/[0-9]/", $asdf)) {
mysql_query($result5);
}else{
echo"<center><br><br><b> invalid. </center></b>";
exit();
}
}
and when I load the page it always return invalid. I dont even have the time to write something in the text field.
Anyone got an idea?
thanks,
--eh
I have a text field, and I need help to make something that will check character by character if its 1-2-3-4-5-6-7-8-9-0, no * ( ) - = + or letters.
I know the function preg_match and is_numeric but I think i don't use them correctly because it's not working.
if (preg_match("/[0-9]/", $asdf)) {
mysql_query($result5);
}else{
echo"<center><br><br><b> invalid. </center></b>";
exit();
}
}
and when I load the page it always return invalid. I dont even have the time to write something in the text field.
Anyone got an idea?
thanks,
--eh