rendered paste body<?php
//Get database connection and setup
require('includes/application_top.php');
include 'includes/xajax_core/xajax.inc.php';
$xajax = new xajax();
$xajax->configure('debug', true);
$rqstGetAdmins =& $xajax->register(XAJAX_FUNCTION, "doGetAdmins");
$xajax->processRequest();
function doGetAdmins()
{
$response = new xajaxResponse();
//Get all ebay accounts
$sqlstring_acct = "select * from alp_administrators";
$selectacct = tep_db_query($sqlstring_acct);
//Fill Accounts Dropdown
while ($myacct_values = tep_db_fetch_array($selectacct)) {
$acctoptions .= '<option name="' . $myacct_values['username'] . '">' . $myacct_values['username'] . '</option>';
}
$objResponse->assign("username","innerHTML",$acctoptions);
return $response;
}
$xajax->processRequest();
?>
<html>
<body>
<table>
<tr>
<td>
<form name="form2" method="post" action="getInventory.php">
Admin Account: </td>
<td>
<select name="xajax_doGetAdmins" id="username">
<?php echo $acctoptions; ?>
</select>
</td>
</tr>
</table>
</body>
</html>