Great Neck South Class of 1972: $alum[firstname] $alum[lastname]: Add Photo"; include '../inc/header.php'; if(!($id && $alum)) { echo "

No such alumnus

"; include '../inc/footer.php'; return; } echo "

$alum[firstname] $alum[lastname]

"; $addPhotoForm = "

Choose File:

Caption:

Please click the \"Add Photo\" button only once. It may take a few minutes to upload your photo.

"; // If the user has submitted a file for uploading. if(isset($_FILES['photo']) && is_uploaded_file($_FILES['photo']['tmp_name'])) { $photoFileName = $id.".".$_FILES['photo']['name']; str_replace(" ","_",$photoFileName); # Add the photo to the MySQL database if(move_uploaded_file($_FILES['photo']['tmp_name'], ABSOLUTE_PATH."alums/".$photoFileName)) { chmod(ABSOLUTE_PATH."alums/".$photoFileName, 0755); if(make_thumbnail($photoFileName,"alums/")) { resizeImage($photoFileName,"alums/",800,600); add_alum_photo($photoFileName, $_POST['title'], $_POST['description'],$_GET['alumID']); # Move the photo from the temp directory to # the images directory. echo "

Photo

The photo was successfully uploaded.

Return to $alum[firstname]'s page."; } else{ echo "

Error Processing Image.

"; } } else { echo "

There was an error uploading the photo.

"; } } // display the form on every page instance echo $addPhotoForm; include '../inc/footer.php'; ?>