You've got a few mistakes. Here's your code
/* construct and run our query */
$query = "SELECT * FROM ffxitems ORDER BY " . $_POST['name'] . "";
$result = mysql_query ($query);
/* make sure data was retrieved */
$numrows = mysql_num_rows($result);
print $query . "<br>";
$result = mysql_query($numrows) or die(mysql_error());
This isn't necessarily a mistake, but i'd change this part of your code to
$result = mysql_query($query) or die(mysql_error());
Then where you have $result = mysql_query($numrows), that's incorrect. You don't run another mysql_query on that. $result contains the results of your query, and mysql_num_rows counts the rows that $result contains. No need to mysql_query again.
And when connecting, I generally leave the quotes out of the mysql_connect and mysql_select_db functions if i'm using variables.
mysql_connect ($hostname,$username,$password);
mysql_select_db ($database_name);
if you have actual values within the functions rather than variables, then you should use quotes.
I don't know if that causes any errors, but just something I noticed.
Cgraz