File Upload if File Exists Append Number to File Name with Increment

<?php
error_reporting(0);
$fileName=$_FILES['fileImage']['name'];
$file=$_FILES['fileImage']['tmp_name'];
$path='image/'.$_FILES['fileImage']['name'];
$extension=fileGetEXT($fileName);

function fileGetEXT($fName)
{
$fileName=$fName;
$start=strpos($fileName,".");
$getEXT=substr($fileName,$start+1,4);
return($getEXT);
}
function createUniqueFile($fName)
{
$fileName=$fName;
$start=strpos($fileName,".");
$name=substr($fileName,0,$start);
$getEXT=fileGetEXT($fileName);
$counter = 1;
while(file_exists($newFileName=strip_tags('image/'.$name.'~'.$counter.'.'.$getEXT)))
{
$counter++;
}
return $newFileName;
}

$validEXT=array("jpg","jpeg","gif","bmp","png");

if(isset($_POST['submit']) && ($_POST['submit']=="Submit"))
{
if(in_array($extension,$validEXT))
{
if(file_exists($path))
{
$newFile=createUniqueFile($fileName);
$path1=strip_tags($newFile);
move_uploaded_file($file,$path1);
echo ucfirst($extension)." Valid Extension";
}
else
{
move_uploaded_file($file,$path);
echo ucfirst($extension)." Valid Extension";
}
}
else
{
echo ucfirst($extension)." Invalid Extension";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>File Uploading</title>
</head>
<body>
<form name="uploadFrm" method="post" action="" target="" id="" enctype="multipart/form-data">
<table align="center" style="border:#666666 solid 1px; margin-top:20px;">
<tr>
<td>First Name:</td>
<td><input type="text" name="txtfirstName" value="" /></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="txtLastNAme" value="" /></td>
</tr>
<tr>
<td>Image:</td>
<td><input type="file" name="fileImage" value="" /></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit" /></td>
</tr>
</table>
</form>
</body>
</html>