Add Testimonial
0)
{
$error_document1 = $_FILES["image"]["error"];
}
else
{
if($_FILES['file']['image'] > 150000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 500Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['file']['tmp_name']);
if($image_size[0] > 9400 or $image_size[1] > 9300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 400 X 300 Px. please try again !";
}
else
{
unlink($folder.$deleteddbimagename);
$temp = explode(".", $_FILES["file"]["name"]);
$filename=current($temp);
$ext = end($temp);
$newname= "TL".time().".$ext";
move_uploaded_file($_FILES["file"]["tmp_name"] , "$folder".$newname);
$passval = array('title' => $title,'description' => $description ,'photo' => $newname);
$db->insert('testimonial',$passval);
print "Success : testimonial Successfully Registered !";
}
}
}
}
}
$_SESSION['addaccnt'] = "E".rand(111111 , 999999);
?>