Google Search

Google Search

HTML/JavaScript

Thursday, September 1, 2011

Image upload

$video_file1=$_FILES["fileupload3"]["name"];
$c1 = rand(0,9);$c2 = rand(0,9);$c3 = rand(0,9);$c4 = rand(0,9);

$rand = $c1.$c2.$c3.$c4;

$date = date("Y-m-d");

if($video_file1!='') {

move_uploaded_file($_FILES['fileupload3']['tmp_name'],'../product_images/'.$rand.$_FILES['fileupload3']['name']);

}


if($video_file1!='') { $path3 = 'product_images/'.$rand.$_FILES['fileupload3']['name']; } else { $path3=$image; }

No comments:

Post a Comment