i have this code in html
<input type="file" name="file" id="file1"/><br />
<input type="file" name="file" id="file2"/><br />
here is my php code
if(!empty($_FILES['image']['name'])) {
$ext=explode('.',$_FILES['image']['name']);
$new_name=$property_id."_".rand(10,10000).".".end($ext);
$name=SITEPATH.S_LOCATIONS_LARGE.$new_name;
$small=SITEPATH.S_LOCATIONS.$new_name;
move_uploaded_file($_FILES['image']['tmp_name'],$name);
if(is_file($name)) {
$this->db->update("insert into bloom_location_images (image,property_id) values ('$new_name',$property_id)");
list($width, $height, $type, $attr) = getimagesize($name);
if($width > 600) {
$this->magic->constrain_by_scale($name,500,0);
}
copy($name,$small);
if($width > 301) {
$this->magic->constrain_by_scale($small,301,0);
}
}
}
return $property_id
now i want to store this two files but i cant. i think i have to pass it through array element. if yes then please tell me how is it possible
please help me to do this