Uploading Images with unique file name In PHP




Uploading Images with unique file name In PHP
==================================================================

$random=rand(1,10000);//For making file unique...



$directory='Uploads/';


$filename=$_FILES["user_image"]["name"];


$tempname=$_FILES["user_image"]["tmp_name"];

$filepath=$directory.$random.$filename;

move_uploaded_file($tempname,$filepath);

Comments

Popular posts from this blog

How To Convert JSON Data Into Html Table Using Javascript jQuery

Pagination in PHP