Ok I tried that and just get the error:
mkdir() failed (Permission denied)
The photos dir is 777 and it is on the root. So I'm not sure what is going wrong.
Even if I make the directory manually, it's not checking, it doesn't echo already exist, it tries to mkdir and fails. I even put in echos afer the variables to make sure the username was ok and it echos out the user name and the directory as "photos/user"
If I use the code from cosminb, I get the error:
open_basedir restriction in effect. File is in wrong directory
Thinking that maybe you can't mkdir on the server wthout some specail permissions, I even opened an FTP session, tried the mkdir code then closed the ftp session, but that didn't help. I wasn't sure if that would so anything at all, I was willing to try anything, lol