Hey.. I'm tring to create a new folder. The folder name will be dependant upon the user enters. Say the user enters 'banana', I want to create a new folder with desination 'Photos/Live/banana'. But i'm getting this error:

Warning: ftp_mkdir(): Photos/Live/banana: No such file or directory in /home/virtual/site13/fst/var/www/html/AddPhotos.php on line 88

And this is the code i'm using:

$foldername = $_POST['userentry'];
						if (!ftp_mkdir($ftp_id, "Photos/Live/$foldername")) {
							echo "Cound not create new folder";
							exit();
						}

Anyone please tell me how i may resolve this issue please??

Many thanks, BIOSTALL

    not tested, but I'd use chdir first to get to Photos/Live, then only ftp_mkdir($ftp_id, $foldername).

      If I chaged directory, how would I return to the folder from which i came?

      BIOSTALL

        [man]ftp_cdup[/man] should do the job.

          Write a Reply...