0

How can I create a directory that does not exist , based on a data in database and saves the file in it ?

example:

fName: Emrys

I would like to create a folder based on the fname and saves the file in it

Thanks.

  • @Fred-ii- any reference you can give is much help thank you :) – Emrys Cabal Feb 27 '16 at 04:08
  • Dagon closed the question with a link you can reference. You can also consult one of my answers http://stackoverflow.com/a/18217147/1415724 - As for db-related; well, in a nutshell, you would need to use a `WHERE` clause for that, then use that reference for it to save the file with. – Funk Forty Niner Feb 27 '16 at 04:11
  • @Fred-ii- Thank you very much :D – Emrys Cabal Feb 27 '16 at 04:15
  • `include_once("../include/session.php"); $fname = $session->fname; $directory = uploaded_files; if (!file_exists($directory."/".$fname)) { mkdir($directory."/".$fname, 0777, true); }` Sir @Fred-ii- How can I make it together with the last name? – Emrys Cabal Feb 27 '16 at 04:38
  • @Fred-ii- got it now WORKING :D thanks for the BIG HELP :) – Emrys Cabal Feb 27 '16 at 05:29

0 Answers0