Uncommented database logic

Uncommented database row ID retrieval logic in result.php.