I have this page it works fine submits the image to the database but just will not redirect to
header("Location:category.php");
exit;
the page it is supposed to it submits the image to the database or produces the correct error if the file is too large or invalid but once it has submitted just does nothing freezes on this page and does not redirect?
<?
ini_set ("display_errors", "1");
error_reporting(E_ALL);
session_start();
error_reporting(7);
require("../global/admin_functions.php");
$sid = $_SESSION['LOGINID'];
if ((($FILES["form_data"]["type"] == "image/gif")
|| ($FILES["form_data"]["type"] == "image/jpeg")
|| ($FILES["form_data"]["type"] == "image/pjpeg"))
&& ($FILES["form_data"]["size"] < 250000))
{
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO uploads (description, data,filename,filesize,filetype) ". "VALUES
('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')") ;
$id= mysql_insert_id();
header("Location:category.php");
exit;
}
else
{
echo "You can only upload JPEG or GIF images that are 250KB or less.";
}
?>