Php error : Uncaught Error: Call to undefined function ifset()

Let me just start by saying that i am not good at Php, so this had me confused for quite a while, and it’s probably a simple answer, but i have no idea what that answer is.

Here’s my code:

$fileName = $_FILES[‘file’][‘name’];
$fileTmpName = $_FILES[‘file’][‘tmp_name’];
$fileSize = $_FILES[‘file’][‘size’];
$fileError = $_FILES[‘file’][‘error’];
$fileType = $_FILES[‘file’][‘type’];

$FileExt = explode(‘.’, $fileName);
$FileActualExt = strtolower(end($fileExt));

$allowed = array(‘jpg’, ‘jpeg’, ‘png’);

if (in_array($FileActualExt, $allowed)) {
if ($FileError === 0) {
if ($fileSize < 50000)
$fileNameNew = uniqid(”, true).”.”.$FileActualExt;
$fileDestination = ‘uploads/’.$fileNameNew;
move_uploaded_file($fileTmpName, $fileDestination );
header(“Location: index.htm?uploadsuccess”);

} else {
echo “The file size is too large.”;
}
} else {
echo “There Was an error uploading the selected file.”;
}
} else {
echo “The File Type is not Permitted.”;
}

Any answers would be appreciated

Read more here:: Php error : Uncaught Error: Call to undefined function ifset()

Leave a Reply

Your email address will not be published. Required fields are marked *