Hi all. I am trying to build a PHP web form that feeds the data in a MySQL database. The data entered is varchar and a file is also uploaded. The following columns are present in the database: vName (not null) vNameID (auto increment) vFileName vDescription I want that the file should be stored in a folder named ./files/ and that the uploaded file should be renamed to vNameID. Thanks in advance.
There's nothing to it. Use the rename command in PHP to move the file where you want it. rename($img['tmp_name'],'files/'.$vNameID.'.ext'); PHP: