Location: PHPKode > projects > Andy's PHP Knowledgebase > aphpkb/plugins/multiaa/multiauthor.php
<?php // multiauthor.php

//starting database

 $mysqldb = new mysql();
 $mysqldb->connect();
 $mysqldb->select(); 

$query="SELECT Username, AuthorID FROM authors";

$mysqldb->query($query);

while($row = $mysqldb->fetchObject()){
if(first){
echo '<select name="aid">';
}
echo <<<_OPTIONS
<option value="$row->AuthorID">$row->Username</option>
_OPTIONS;
}
echo "</select> Save to new Author.<br />";

?>
Return current item: Andy's PHP Knowledgebase