PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$statusname is a result set. You need to use one of the mysql_fetch_*() functions to get data from it.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
OK, so look at your code. You ran a query and assigned the result to $result. You then fetched a row into $row with mysql_fetch_array($result) so that you could access the data ($row['User'], etc...). That is the proper way, so just follow the same steps with your next query.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.