This post will help you to upload an image file to server with A new name . File name will be database auto increment field value . So no name conflict will be arise.
function SaveSliderImage($file)
{
$stmt = $this->conn->stmt_init();
if ($stmt->prepare("insert into ueks98_si_jsj_os9 (id,id1,id2) values(NULL,?,?)"))
{
//Get File Extension
$tmpstr=strtolower($_FILES[$file]['name']);
$extnsn=end(explode(".",$tmpstr));
function SaveSliderImage($file)
{
$stmt = $this->conn->stmt_init();
if ($stmt->prepare("insert into ueks98_si_jsj_os9 (id,id1,id2) values(NULL,?,?)"))
{
//Get File Extension
$tmpstr=strtolower($_FILES[$file]['name']);
$extnsn=end(explode(".",$tmpstr));