Im likely doing something very simply wrong, but when I try to make a directory (using a variable of an insert just performed as the last folder name), I get the error:
You shouldn't use is_dir() to check if something exists, you want file_exists() as well. Try:
if (file_exists("images/listing-images/rent/$insertID") {
mkdir("images/listing-images/rent/$insertID.");
}
Have taken the '. out since it looks like a syntax error, but you might have a legitimate reason to keep it in.
If the mkdir still fails, it could be that images/listing-images/rent doesn't exist, you'll have to create that separately if so.