I am making a php form. I want to validate numerical content in PHP. I am using this PHP code for do it.
if (!preg_match('/^[0-9]*$/',$id))
{
$id_Err = "Only numbers allowed";
}
But this code allows numbers starts with 0.
ex:- 01,02,.....,0100...
I only need to allow nubers like
1,2,....100,...
How can I write this regular expression?