I would check the file permissions. On linux:
ls -al /path/to/projecten/projecten/
In simple terms the web server user must have write access to the directory in order to delete the file, for example the user www-data. In the below example the user lt can delete the test file:
drwxrwxr-x 2 lt lt 4096 Apr 29 08:54 test
Also I don't understand this bit of code:
$status = 'true';
if($status=='true'){
rmdir($dir);
$status = 'false';
}
Why not just have:
rmdir($dir);
As $status will always be 'true'.
You could also try using a system call, eg:
system `rm -rf /full/path/to/projecten/projecten/$nameFolder`;
Be very careful with that system command though - If you delete the wrong directory there is no going back!
A safer system command to use if you know the directory is empty would be:
system `rmdir /full/path/to/projecten/projecten/$nameFolder`;
But as pointed out in the comments above be very careful deleting a directory based on a $_GET variable. Imagine if the GET variables was '../../projecten' especially with the 'rm -rf' system command