id) { error_page("No access"); } $type = "user"; $clause = "userid=$userid"; } page_head("Results for $type"); result_table_start(true, false, true); $i = 0; $query = "select * from result where $clause order by id desc limit $offset,".($results_per_page+1); $result = mysql_query($query); $number_of_results = mysql_affected_rows(); echo show_result_navigation( $clause, $number_of_results, $offset, $results_per_page ); while ($res = mysql_fetch_object($result) and $i<$results_per_page) { show_result_row($res, true, false, true); $i++; } mysql_free_result($result); echo "\n"; echo show_result_navigation( $clause, $number_of_results, $offset, $results_per_page ); page_tail(); ?>