ASPit - Totally ASP JSit - Totally JavaScript
Search PHPit

Use this textbox to search for articles on PHPit. Seperate keywords with a space.

Advertisements

Valid ID

This very short, but useful, codesnippet allows you to quickly validate a numeric ID, often used in a database table.

function valid_id($id) {
    if (empty(
$id) || !is_numeric($id)) {
        return 
false;
    } else {
        return 
true;
    }
}
?>

Leave a Reply