<?php require_once('../Connections/conn_ama.php'); 
	include("../../../../../../functions/functions.php");    
		
	if (!isset($_SESSION)) {
	session_start();
	}


	if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "save-gallery-update")) {
		
		$updateSQL = sprintf("UPDATE galleries SET gallerytitle=%s, gallerydesc=%s WHERE galleryID =%s ",	
		GetSQLValueString(trim($_POST['gallerytitle']), "text"),
		GetSQLValueString($_POST['gallerydesc'], "text"),
		GetSQLValueString($_POST['MM_galleryID'], "int"));

		$Result1 = mysqli_query($conn_ama, $updateSQL) or die(mysqli_error($conn_ama));
		//$newsID = mysqli_insert_id($conn_ama);	
		if($Result1){
			$result = "datasent";
			echo $result;
		}		

	}


?>
