Populates a select field with database stuff. Use like so:

databaseToSelect($select, $table, $label, $value, $sql);

$label and $value are fields you want to display as label and value in select options. $table
is the name of the table you want to look for. $select is the name of the select input. $sql holds custom SQL query, if supplied. If not,
function will perform a simple 'SELECT $label, $valueFROM $table';

example; databaseToSelect('mySelect', 'users', 'name', 'ID);