Results 1 to 2 of 2

Thread: How do i...

  1. #1
    Join Date
    Nov 2007
    Posts
    753
    Tokens
    0

    Default How do i...

    On my image upload script when an image is uploaded it is stored as the same name e.g. image.gif is uploaded as image.gif.
    I want it so that when it is uploaded it is called image54654096.gif (the number being randomly generated everytime).
    The main reason i want this is because on Forgeload V1.0 you can only upload image.gif once as it is stored in the folder in that name.

    Does anybody know how to do this? +Rep
    Cheers

    Moved by Agesilaus (Forum Moderator) from Design and Development: Moved to the appropriate specific forum for this discussion.
    Last edited by Agesilaus; 10-12-2007 at 06:02 AM.
    Publishing free website designs, watch this space!
    Total number of designs published: 0
    Current work in progress: Landscape Design


  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    $fname uniqid("");
    move_uploaded_file($_FILES["file"]["tmp_name"],"images/$fname"); 
    Should work.
    Coming and going...
    Highers are getting the better of me

Posting Permissions

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