I have the following EXTREMELY simple upload script, as i'm learning still.
Code: Select all
if($_FILES["img1"] !="") {
$uploaddir = "css/";
if (move_uploaded_file($_FILES["img1"]["tmp_name"], $uploaddir . $_FILES["img1"]["name"])) {
echo("file uploaded");
} else {
echo ("error!");
}
}Basically, i want to rename the names of the images so their name resembles something like:
001.png
002.png
003.png
004.png
005.png
Each time I upload, the next image will be
006.png
etc.
A mySQL resolution would be IDEAL.
Thanks in advanced.