I know I post a thousand threads sorry... so my issue is...
<?php
$uploaded_boolean = file_exists($_FILES["uploaded_avatar"]["…
$gif = '.gif';
$jpg = '.jpg';
$jpeg = '.jpeg';
$png = '.png';
$jpeg1 = 'jpeg';
$gif1 = 'gif';
$jpg1 = 'jpg';
$png1 = 'png';
$max_file_size = '1048576';
$new_avatar = $_FILES['uploaded_avatar']['name'];
$avatar_ext = end(explode('.', $new_avatar));
if (isset($_POST['change_submit1'])) {
if ($_SESSION['logged_in'] != '1') {
echo 'You need to be logged in!';
} elseif ($_POST['change_box1'] != 'CHANGE') {
echo 'You must fill in the "CHANGE" box!';
} elseif ($uploaded_boolean == False) {
echo 'No file selected!';
} elseif (($avatar_ext != $jpg1) && ($avatar_ext != $png1) && ($avatar_ext != $gif1) && ($avatar_ext != $jpeg1)) {
echo 'File format not supported!';
} elseif ($_FILES["uploaded_avatar"]["size"] > $max_file_size) {
echo 'File is too big!';
}
}
?>
It seems like it would work...but it outputs no file selected even though I want it to say File format not supported. They are in the correct order. am i checking for the file upload incorrectly or something? help please!