TRY changing this line (which is i think line number 42)
PHP Code:
$result = @mysql_query('SELECT * FROM games');
with (which are 64-68)
PHP Code:
$order = isset($_GET['order']) ? mysql_escape_string($_GET['order']) : 'system'; // Request the text of all the info
$result1 = @mysql_query(
"SELECT system,title,developer,publisher, year,purchased,genre,serial FROM games
ORDER BY $order DESC"
);
Line numbers can be wrong. so, take care
i think all you did is put the query at wrong place. just need to exchange it
Suggestion
don't order by the input from url. what if i changed the url manually and changed to
Something_wrong. this will give error and your query won't execute
try, using switch statement as
PHP Code:
$order = '';
switch($_GET['order'])
{
case 'order':
$order = 'order';
break;
case 'system':
$order = 'system';
break;
default:
$order = 'order';
break;
}
this will take the default one if user changes the link manually. people (like me) try to do it just to see how the code handles it??