EditAdd leadership

Success! Content successfully added.
"; echo ''; } else { $message = "
Error! Problem uploading Content.
"; } } if(!empty($_POST['btnedit'])=="Save Changes") { $leadership_title= mysqli_real_escape_string($conn,$_POST['leadership_title']); $leadership_sub_content= mysqli_real_escape_string($conn,$_POST['leadership_sub_content']); $leadership_content= mysqli_real_escape_string($conn,$_POST['leadership_content']); if($_FILES['leadership_image']['name']) { $leadership_image = time() . '_' . $_FILES['leadership_image']['name']; $destination = '../upload/leadership/' . $leadership_image; move_uploaded_file($_FILES['leadership_image']['tmp_name'], $destination); } else { $leadership_image=$_POST['leadership_image_prv']; } //echo "UPDATE `tm_leadership` SET `leadership_title`='$leadership_title',`leadership_image`='$leadership_image',`restaurant_id`='$restaurant_id' WHERE `id`='".$_REQUEST['leadership_id']."'"; //die; $update_sql= mysqli_query($conn,"UPDATE `tm_leadership` SET `leadership_title`='$leadership_title',`leadership_image`='$leadership_image',`leadership_content`='$leadership_content',`leadership_sub_content`='$leadership_sub_content' WHERE `id`='".$_REQUEST['leadership_id']."'"); if ($update_sql) { $message = "
Success! Content updated successfully.
"; echo ''; } else { $message = "
Error! Problem updating Content.
"; } } ?>
window.location='index.php'"; exit; } ?>