Bem, tem vário erros...
Não podes utilizar uma função chamada catch, essa "função" está reservada para programação orientada por objectos em PHP 5.
Tenta assim
<?php
session_start();
include ("check.php");
function filtrar($pvar) {
$x = stripslashes($pvar);
$x = str_replace("'",'"',$x);
$x = str_replace("\"",'"',$x);
return $x;
}
$name = filtrar($_POST['name']);
$cat = filtrar($_POST['category']);
$author = filtrar($_POST['author']);
$version = filtrar($_POST['version']);
$short = filtrar($_POST['short_description']);
$long = filtrar($_POST['long_description']);
$screen = filtrar($_POST['screenshot']);
$file = filtrar($_POST['download']);
if (!$name) {
echo "<html><head><script>alert('You did not enter a name!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$cat) {
echo "<html><head><script>alert('You did not select a category!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$author) {
echo "<html><head><script>alert('You did not enter an author!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$short) {
echo "<html><head><script>alert('You did not enter a short description!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$long) {
echo "<html><head><script>alert('You did not enter a long description!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$file) {
echo "<html><head><script>alert('You did not enter a file download URL!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if ($file == "http://") {
echo "<html><head><script>alert('You did not enter a file download URL!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
if (!$version) { $version = "Not Available"; }
if (!$screen) { $screen = "na"; }
if ($screen == "http://") { $screen = "na"; }
$date = date("d/m/y");
include ("../db.php");
$sql_name_check = mysql_query("SELECT name FROM downloads WHERE name='$name'") or die (mysql_error());
$name_check = mysql_num_rows($sql_name_check);
if ($name_check == 1) {
echo "<html><head><script>alert('File name is already in use!')</script></head><body onload=javascript:history.go(-1)> </body></html>";
exit();
}
else {
mysql_query("INSERT INTO downloads (cat, name, author, version, short_description, long_description, url_screenshot, url_download, date) VALUES('$cat', '$name', '$author', '$version', '$short', '$long', '$screen', '$file', '$date')") or die (mysql_error());
echo "<script>alert('File $name added!')</script>";
include ("addfile.php");
}
?>
Nota: o que postei vai resolver os erros, nada mais... em termos de segurança, isso já será outra história...