<?php
if (!isset($_SESSION['FirstName'])) {
	session_start();
}
include ('includes/db1config.php');
include ('../includes/mysql_connect.php');
include ('includes/admin-config.php');

if( isset($_REQUEST['image_caption']) && isset($_REQUEST['recordkey']) ) {
	$caption = $_REQUEST[image_caption];
	$recordkey = $_REQUEST[recordkey];
	if(!empty($recordkey)) { // caption may be empty
		$qry = "update gallery_images set image_caption = '$caption' where recordkey = '$recordkey'";
		mysql_query($qry);

		echo '1';
	}
}
?>