uploaded images give the name of image_counter
<p>uploaded images give the name of image_counter</p>

<pre><code>$counter=1; this counter variable to be placed with image_counter
$parts = explode(".", $_FILES["filename"]["name"]);

echo "&lt;pre&gt;";
print_r($parts);
echo "&lt;/pre&gt;"; 
//SELECT FROM END OF THE PART
$extension = end($parts);
echo $extension;
     tmp is the folder where i am going to store my images 
$to_file = "tmp/image_". $counter."." . $extension;
$from_file = $_FILES['filename']['tmp_name'];
if(move_uploaded_file($from_file, $to_file)) { 
    echo "Successful upload"; 
} else { 
    echo "Unsuccessful upload"; 
}   
</code></pre>

<p>and each time counter value is incresd and we get images names as image_1,image_2 and so on</p>
