Jump to content


Photo

EASY PROBLEM :P i'm just retarded :D PLEASE HELP. REALLY EASY.


  • Please log in to reply
2 replies to this topic

#1 JustinMs66@hotmail.com

JustinMs66@hotmail.com
  • Members
  • PipPipPip
  • Advanced Member
  • 138 posts

Posted 09 September 2006 - 05:01 AM

ok so (lol) this is SOOO easy, i can't belive i'm this retarded.
i wana have it so when you press the "submit" button, it creates a directory, and the directory name is the name that is in the textbox.

so like in the index.html file i have this:

<form method='post' action='foldercreate1.php' enctype='multipart/form-data'>
	  <!--  the textbox. this is what should be the folder Name:  -->
    <input name="foldername1" type="text" value="" maxlength="18">
	<br>
	 <!--  the submit button: -->
    <input type="submit" value="Create Folder">
  </form>

and so the variable of the text in the textbox is "foldername1". correct?

and in the foldercreate1.php i have this:
<?php
mkdir($_FILES['foldername1']);
?>

and an error comes up saying:
Warning: mkdir() [function.mkdir]: No such file or directory.

so like yea, what do i do?


#2 JayBachatero

JayBachatero
  • Members
  • PipPipPip
  • Advanced Member
  • 296 posts
  • LocationQueens NY

Posted 09 September 2006 - 05:07 AM

You need to provide a full path of where you want the dir to me created.  Also you need to use $_POST and not $_FILES.
JayBachatero
SMF Developer && Converter Specialist

#3 JustinMs66@hotmail.com

JustinMs66@hotmail.com
  • Members
  • PipPipPip
  • Advanced Member
  • 138 posts

Posted 09 September 2006 - 05:12 AM

o ok i just replaced FILES with POST and that worked :) thnx man.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users