Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-09-2003, 11:11 AM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
Folders?

is there a way to use like a form to create a folder with teh name of that form in it? probably using i/o functions in php?
if any one knows what im talkin about please respond.
Reply With Quote
  #2  
Old 07-10-2003, 02:24 AM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

Ok this will create a folder in the directory you upload this to, this is my forst piece of php code YES!!!!

You need to chmod the file and directory you place this into i did it to 777

This is only the most basic code, if you come back soon and if i can get it to work ill put in a bit more like a confirmation
Attached Files
File Type: txt input.php.txt (359 Bytes, 18 views)
Reply With Quote
  #3  
Old 07-10-2003, 03:15 AM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

k ive updated it for you and it still works!

now it will check to see if the folder is already there, and if it is will aks for a different name, also gives confirmation.
Attached Files
File Type: txt input.php.txt (572 Bytes, 12 views)
Reply With Quote
  #4  
Old 07-10-2003, 11:28 AM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

PHP Code:
<?php

$test 
is_dir("$FolderName");  //seeing if folder exists
if ($test//found a folder
    
{  
        echo 
"folder already exists,please choose a different name";
}


if (
$submit == "click"){ 
  
mkdir ("$FolderName");
print(
"All done, the folder has been created");
}
else{
echo
'
  <html><body> 

  <form method="post" action="input.php"> 

  Enter Your Desired Folder Name 
  <input type="text" name="FolderName"></input><br> 

  <input type="submit" name="submit" value="click"></input> 

  </form> 

  </body></html> 
  '

 
}

?>
Why do you have $Submit == "click"?
Should be enough with, if($Submit)...
Looks like a good script
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #5  
Old 07-10-2003, 01:36 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
ty man
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
wtf?? Folders just... Scattergun Tech Support 5 04-25-2006 08:21 PM
Cannot upload into created folders? Joe phphq.Net Forums 3 01-26-2005 07:29 AM
Sorting Folders peterc phphq.Net Forums 1 10-29-2004 02:48 AM
Uploading Whole Folders?? ShArP Feedback / Novahq.net Support 4 10-09-2004 09:55 AM


All times are GMT -5. The time now is 04:22 AM.




Powered by vBulletin®