tags(trim($_POST['tags']));
// Allowed file types
$allowed_types = array('jpg', 'jpeg', 'png', 'webp');
if (in_array($file_type, $allowed_types)) {
// Move file to server
if (move_uploaded_file($_FILES['image']['tmp_name'], $image_path)) {
// Attempt making a thumbnail
list($width, $height) = getimagesize($image_path);
if ($width > 300) {
if ($make_stuff->thumbnail($image_path, $thumb_dir.$image_newname, 300) != "success") {
?>
1100) {
if ($make_stuff->thumbnail($image_path, $preview_dir.$image_newname, 900) != "success") {
?>