Closed Thread
Results 1 to 4 of 4

Thread: php unlink script for 100 credits!!!

  1. #1
    nahsorhseda's Avatar
    nahsorhseda is offline x10 Sophmore nahsorhseda is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    mumbai
    Posts
    116

    php unlink script for 100 credits!!!

    can any one make me a directory delete script which has files but no folders in it
    to be more precise i want to delete it from a html form like this one below
    <form action=samepage.php method=post>
    <input type=text name=input>
    <input type=submit name=delete>
    </form>
    so when i hit the submit button i want the directory to be deleted of which i have typed the name in the input box.
    and one more thing all the dirs. r in the root and the script also must be in the root
    please help this poor girl out iam also paying you 100 credits!!
    Last edited by nahsorhseda; 01-09-2008 at 01:08 AM.
    glad to resolve problems in c++ n php

  2. #2
    supajason's Avatar
    supajason is offline x10 Lieutenant supajason is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    England........:-)
    Posts
    288

    Re: php unlink script for 100 credits!!!

    here you go....


    PHP Code:
    <?php

    if(isset($_POST['delete']))
    {
    $input $_POST['input'];

       
    $dir_delete './' $input;
       
       if (
    rmdir ($dir_delete)) {
             echo 
    "Directory deleted successfully." "<br />";
         echo 
    "<a href=" $PHP_SELF ">Back</a>";
       }else {
             echo 
    "Could not delete the directory." "<br />";
         echo 
    "<a href=" $PHP_SELF ">Back</a>";
       }

    }
    else
    {
    ?>
    <form action="<?php $PHP_SELF ?>" method="post">
    <input type="text" name="input">
    <input type="submit" name="delete">
    </form>
    <?php
    }
    ?>
    supajason was here

  3. #3
    jacksing is offline x10Hosting Member jacksing is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    73

  4. #4
    nahsorhseda's Avatar
    nahsorhseda is offline x10 Sophmore nahsorhseda is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    mumbai
    Posts
    116

    Re: php unlink script for 100 credits!!!

    how can you be so foolish i already told you that the directory has files in it .the directory isnt empty.so you need to empty the directory before you can remove it.

    please make that script for me!!
    Edit:
    ok i got it
    i got it from php.net/unlink
    Last edited by nahsorhseda; 01-10-2008 at 02:31 AM. Reason: Automerged Doublepost
    glad to resolve problems in c++ n php

Closed Thread

Similar Threads

  1. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  2. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  3. 500 credits for php script
    By Christopher in forum The Marketplace
    Replies: 3
    Last Post: 10-19-2007, 11:47 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers