change the image name in php
<p>hi i want to upload image on server and i have done it but the problem is when i upload image with the same name it give me error what i want to do to append something to end of image name so that every image has its own unique 
name.</p>

<pre>$TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']['name']);
if (file_exists($TARGET_PATH))
{
    // here will be the appended term
}</pre>
