PHP to rename uploads chronologically if same name exists
<p>I currently have this script running to upload recordings from my smart phone app and it works great. But some users are not filling out their info completely and the uploads have  aname of "null" I want them to "If the upload name = null, then" rename them chronologically: null1, null2, null3, etc</p>

<p>But if their is no file currently in the folder with a matching name, then keep the uploaded name. Example, there could be john smith and john smith1, but no Jane Smith, so just keep the name. Here is my code  </p>

<pre><code>&lt;?php
print_r($_FILES);
move_uploaded_file($_FILES["file"]["tmp_name"], "mp3/".$_FILES["file"]["name"]);
?&gt;
</code></pre>
