need help in php file upload

Discussion in 'PHP' started by xcd125, Mar 22, 2011.

  1. #1
    I Am trying to create an simple image sharing website, i need a help with the file upload script. when a user uploads a file it should be renamed and stored in the server just like tinypic.

    here is my php code:
    Now what is the code snippet and where should i add that in this script to rename the uploaded files?

    please help me Thanks in advance..
     
    xcd125, Mar 22, 2011 IP
  2. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40
    #2
    Just edit the line that says:
    "upload/" . $_FILES["file"]["name"]);
    to
    "upload/imgnamehere");
     
    Arttu, Mar 23, 2011 IP