Hi
I have the following code
$uploaddir = ‘../images/deletables/’; // Relative path under webroot
$uploaddir2 = ‘/images/deletables/’; // Relative path under webroot
if(!empty($_FILES[‘userfile’][‘name’])){
$uploadfile = $uploaddir.basename.($_FILES[‘userfile’][‘name’]);
$loc = $uploaddir2.basename.($
if (move_uploaded_file($_FILES[‘userfile’][‘tmp_name’], $uploadfile)) {
$sql = mysql_query(“INSERT INTO hb_photo(photo_location) VALUES (‘”.my_safe($loc).”‘)”);
$id = mysql_insert_id();
$sql = mysql_query(“INSERT INTO hb_album_photo(album_id, photo_id) VALUES (‘”.my_safe($album).”‘, ‘”.my_safe($id).”‘)”);
}
}
How would i give the file name a number. For example 21.jpg, as opposed to the actual filename when uploaded.
Thanks