swal({
title: "Error",
text: "File Is Not A Image",
type: "error",
confirmButtonText: "OK"
});
';
$uploadOk = 0;
}
// Check if file already exists
if (file_exists($target_file)) {
echo '';
$uploadOk = 0;
}
// Check file size
if ($_FILES["image"]["size"] > 1048576) {
echo '';
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
&& $imageFileType != "gif" ) {
echo '';
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo '';
// if everything is ok, try to upload file
}
else
{
if (move_uploaded_file($_FILES["image"]["tmp_name"], $target_file)) {
$imglink = $target_dir.$_FILES["image"]["name"];
$sql = "UPDATE `pak_doctor` SET `pak_id` = '$id', `pak_name_eng` = '$ename', `pak_name_guj` = '$gname',`pak_link` = '$link', `pak_img` = '$imglink' WHERE `pak_doctor`.`pak_id` = $id";
if($con->query($sql) == TRUE)
{
echo '
';
}
}
}
}
?>
query($sql);
$row = $rows->fetch_assoc();
?>