prepare("INSERT INTO swag_table (imagename, alt) VALUES (?, ?)"); $sql->bind_param("ss", $image_name, $get_alt_text); // Uploading image to Table $sql->execute(); // Checking if image uploaded if (move_uploaded_file($_FILES['image']['tmp_name'], $image_path)) { // Make thumbnail $image_thumbnail = new Imagick($image_path); // Get image format $image_format = $image_thumbnail->getImageFormat(); // If image is gif if ($image_format == 'GIF') { $image_thumbnail = $image_thumbnail->coalesceImages(); } // Resize image $image_thumbnail->resizeImage(300,null,null,1,null); // Save image $image_thumbnail->writeImage("images/thumbnails/".$image_basename); $success = "Your Image uploaded successfully!"; } else { // Could not move images to folder $error = "F, Upload failed"; } } else { // No image present $error = "No file lol"; } } ?>

Upload image

In this world you have 2 choices, to upload a really cute picture of an animal or fursuit, or something other than those 2 things.

".$error."

"; } if (isset($success)) { echo "

".$success."

"; } ?>