basically:
you can pass arrays as wenn as flat variables
function verflogin($table, $row)
-> $table can be an array, too.
in the function itself you'll need to check whether it's an array or not that comes along, see is_array().
regarding db connection function:
what you describe is a db_query abstraction function, ie a function that receives a database login and password as well as an sql statement (or parts of it) and returns only the field contents.
search for database abstraction functions in the code area.
I made good experience with a simple function like this included in my scripts:
$DBNAME = "xxx";
$HOSTNAME = "xxx.yyy.zzz";
function db_query($sql)
{
global $DBNAME, $HOSTNAME;
$conn = pg_connect("host=$HOSTNAME dbname=$DBNAME");
$stmt = pg_exec($conn, $sql);
$rows = array();
$result = array();
$num = pg_numrows($stmt);
for($i=0; $i<$num; $i++)
{
$result = pg_fetch_row($stmt, $i);
$rows[$i] = $result;
$result = array();
}
pg_close($conn);
return $rows;
}
this is an example that works for postgres. give it an sql select statement, and it will return a 2-dim. array containing n records with m fields each.
hope you can start with this.