SoFunction
Updated on 2025-03-09

A function was created to detect whether the transmitted parameter is a number

function checknum($id,$say)  
{  
            $inid=$id;  
            if(!ereg("^(-{0,1}|\+{0,1})[0-9]+(\.{0,1}[0-9]+)$",$inid))  
        {  
echo $say.", Entrance: "."<font color=red>".$inid."</font>";
            exit;  
        }  
}