Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10

Thread: Delete images

  1. #1
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default Delete images

    okay right so now i have made my folio system and i suck at mySQL

    if thats what it even is Lol.

    Anyway i have the images, an admin panel and the upload script.

    Now i need the code to be able to delete them.

    they do not save to the database

    They save to a folder on cPanel.

    +rep for any help.
    Looking for a good desiner to design a social networking template.

    PM me.

  2. #2

    Default

    PHP Code:
    <?
    unlink
    ("link to file.gif");
    ?>
    Is that what you want?
    Managing Director
    Atomic Network Productions Ltd.
    The best in custom coding solutions.

  3. #3
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    unlink = delete?

    And what would i put instead of file.gif? so that it automatically detects the image i want to delete?
    Looking for a good desiner to design a social networking template.

    PM me.

  4. #4
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    If you had a form you could use

    $file = $GET_['file'];

    unlink($file);

  5. #5
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    i have got an upload form, as its a folio system?

    How would i make that a link?
    Last edited by Ini; 26-10-2006 at 02:52 PM.
    Looking for a good desiner to design a social networking template.

    PM me.

  6. #6
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    Sorry to bump but i need help
    Looking for a good desiner to design a social networking template.

    PM me.

  7. #7

    Default

    You could enter the name of the file into a form, or you could make each image have a delete hyperlink, which then has a GET variable with the file name in.
    Managing Director
    Atomic Network Productions Ltd.
    The best in custom coding solutions.

  8. #8
    Join Date
    Oct 2006
    Location
    UK
    Posts
    166
    Tokens
    0

    Default

    PHP Code:
    <?
    $file 
    $_GET[file];
    unlink("$file");
    ?>
    Save that as delete.php

    Then go to http://www.yourwebsite.com/delete.ph...ages/image.gif
    Last edited by George Morgan; 27-10-2006 at 10:59 AM.

  9. #9
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    You would nead to have a user system to define if your a admin as I could easily delete your site.

  10. #10
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Make an upload form to submit the picture name into the database and upload to a directory.

    Then just get a dropdown to pull all the image names from the database.

    Hit submit and that name will insert into the unlink function.

    Not hard at all

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •