You are here: HomeForums » PHP » PHP - Functions » Function to test variables

Function to test variables (1 post)

in Forums » PHP » PHP - Functions
  • Started 1 month ago by thdadmin

thdadmin (administrator)

This function is quite similar to the isset() function - but saves having to write $_POST for each variable you want to test .

function posted () {
    $arglist = func_get_args ();

    foreach ($arglist as $arg)
        if (! isset ($_POST[$arg])) return false;

    return true;
}
Posted 1 month ago #

Reply

You must log in to post.