Ok, I have one problem with this.
Say, this function needs variables passed to it, i.e
function dropdown($table, $name) {
include "admin/lib.mysql.php";
$query="SELECT * FROM $table ORDER BY $name ASC;";
$result=mysql_db_query($dbname, $query, $dblink);
if ($row=mysql_fetch_array($result)) {
//print "<select>";
do {
printf("<option value=\"%s\">%s</option>\n", $row["$name"], $row["$name"]);
} while ($row = mysql_fetch_array($result));
}
}
The moment I have this function is say lib.mysql.php, and I call it from another file, called branch.php as follows:
? print dropdown(branch,b_name); ?>, and lib.mysql.php is included in branch.php, it tells me it cannot redeclare dropdown() in lib.mysql.php.
Why not?