Once again I've hit the wall!!!

I had this script working earlier, since I added a few more checks it's gone downhill! The script does everything except the the uploaded file size is 0.

Help please!

Thanks in advance, Gypsy.


<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<title>Photo Upload</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000ff" alink="#0000ff"
topmargin="0" marginheight="0">

<?php
$mailheaders = "photo upload";

if ($firstname != "") {
} else {
die("No <b>FIRST NAME</b> specified.");
}
if ($lastname != "") {
} else {
die("No <b>LAST NAME</b> specified.");
}
if ($email != "") {
} else {
die("No <b>EMAIL ADDRESS</b> specified.");
}
if ($title != "") {
} else {
die("No <b>PHOTO SUBJECT</b> specified.");
}
if ($date != "") {
} else {
die("No <b>PHOTO DATE</b> specified.");
}
if ($location != "") {
} else {
die("No <b>PHOTO LOCATION</b> specified.");
}
if ($message != "") {
} else {
die("No <b>PHOTO HISTORY</b> specified.");
}
if ($section != "") {
} else {
die("No <b>PHOTO TYPE</b> specified.");
}
if ($superdat_size < 500000) {
} else {
die("<b>PHOTO FILE TOO LARGE</b> ");
}
if ($superdat_name == ""){
echo " <b>NO INPUT FILE SPECIFIED</b> ";
exit;
}
# see if file type is ok
if( ($superdat_type == "image/pjpeg") OR ($superdat_type == "image/gif")){
copy("$superdat", "./photos/$section/$superdat_name") or
die("Couldn't copy file.");
}
#if file type isn't ok exits
else if ( ($superdat_type != "image/pjpeg") OR ($superdat_type != "image/gif")){
echo"wrong file";
exit;
}

# sends email to you

$msg = "Title: $title\n";
$msg .= "Taken $date at $location\n";
$msg .= "File Name: $superdat_name\n";
$msg .= "File type: $superdat_type\n";
$msg .= "Posted In: $section\n";
$msg .= "Message: $message\n\n";

$to = "$recipient";
$from = "$email";
$subject = "New Photo Submission";
$mailheaders = "From: $email<> \n";
$mailheaders .= "Reply-To: $email\n\n";

mail($to, $subject, $msg, $mailheaders);



#This is where it sends confirmation email to who uploaded the file

$msg .= "$firstname, thank you for uploading:\n";
$msg .= "$superdat_name at www.mywebsite.com\n";
$msg .= "Subject: $title\n";
$msg .= "File type: $superdat_type\n";
$msg .= "Message: $message\n\n";

$to = "$email";
$subject = "Confirm file upload";
$mailheaders = "From: Benson Vermont Website <> \n";
$mailheaders .= "Reply-To: $email\n\n";

mail($to, $subject, $msg, $mailheaders);


php?>

<html>
<link rel="stylesheet" type="text/css" href="css/html.css" media="screen, projection, tv " />
<link rel="stylesheet" type="text/css" href="css/layout.css" media="screen, projection, tv" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<link rel="shortcut icon" href="images/favicon.ico" />

</head>

<body>


<!-- CONTENT: Holds all site content except for the footer. This is what causes the footer to stick to the bottom -->
<div id="content">



<!-- HEADER: Holds title, subtitle and header images -->
<div id="header">

<div id="title">
<h1>Benson Vermont</h1>
<h2>"...Just Over The Hill"</h2>
</div>

<img src="images/farm.gif" height="100%" alt="right slice" class="right" background="white">

</div>



<!-- MAIN MENU: Top horizontal menu of the site. Use class="" to turn the current page tab on -->
<div id="mainMenu">
<ul class="FloatCenter">
<script language="JavaScript" src="jstemplate1.js"></script>
</ul>
</div>

<center><h2><? echo "$firstname"; ?> thanks for your photo submission. </h2></p>

<img src="http://www.mywebsite.com/photos/<? echo "$section"; ?>/<? echo "$superdat_name"; ?>">

<p class="small"><? echo "$superdat_name"; ?>, a <? echo "$superdat_size"; ?>
byte <? echo "$superdat_type"; ?> file.</h4>
</body>
</html>