I dont know if what you're doing would be faster or not than my idea but its a shot. Instead of hitting the db twice for the information you could do this. And instead of using the * which is a wildcard character, you seem to only be wanting the manager_name so get only that.
PHP Code:
<?php $query = safe_query("SELECT 'manager_name' FROM `table` ORDER BY `manager_name` ASC "); $user = array(); while($p=mysql_fetch_array($query)) { array_push($user, $p['manager_name']); } $display = ""; for ($user as $value) { $display .= "\t\t<p><a href=\"javascript:;\" onClick=\"opener.location.href=\'sendmoney.php?who=". $value ."\"';window.close();\" target=\"_parent\">". $value ."</a></p>\n"; } ?> <div id="left"> <?php echo $display; ?> </div> <div id="right"> <?php echo $display; ?> </div>
Last edited by castis; 12-19-2007 at 02:25 PM..
Reason: newline character added
|