<?php 
if (!isset($_SESSION['FirstName'])) {
	session_start();
}

include ('includes/db1config.php');
include ('../includes/mysql_connect.php');

if (isset($_POST['id']) && isset($_POST['value']) && !empty($_POST['id']) && !empty($_POST['value'])) {
	$id = $_POST['id'];
	$value = intval($_POST['value']);

	$sql = "UPDATE formData
			SET text_rows = '".mysql_real_escape_string($value)."'
			WHERE recordKey = '".mysql_real_escape_string($id)."'";
	mysql_query($sql) or die(mysql_error());

	echo '1';
	die();
} else {
	echo '0';
	die();
}
?>