Undefined index! "dir" is already there, line 9.