<?php
	include_once('../config.php');     
 
            
			if(isset($_POST['SubmitOtp']))
			{    
		     
                    $ext = explode('.',basename($_FILES['fileUp']['name']));//explode file name from dot(.)  
                    $Fname =  substr(md5(uniqid()),26).".". $ext[count($ext) - 1];  
                    $target_path = ABS_PATH."/mob/uploads/reviews/".$Fname;//set the target path with a new name of image  
                    move_uploaded_file($_FILES['fileUp']['tmp_name'], $target_path);     

                    $stmt=$conn->prepare("insert into UI__UploadReviews(fname,Tdate,custId) values(:fname,:Tdate,:custId)"); 
                    $stmt->bindValue(':fname',  $Fname , PDO::PARAM_STR);   
                    $stmt->bindValue(':Tdate',  date("d-M-Y H:i") , PDO::PARAM_STR);   
                    $stmt->bindValue(':custId', $_REQUEST['custId'] , PDO::PARAM_STR); 
                    $stmt->execute();       
    				header("Location: ".ROOTPATH."/");
    				die;  
			}
    
$_Refid = $_REQUEST['refId']; 
include_once("../view/registration/uploadVideo.php");
?>