<?php
include("sessionStart.php");
include("database.php");
//include('adminsessionCheck.php');
if(isset($_POST['submit']))
{
	$res=mysql_query("update home_content set home_content='".addslashes($_POST['home_content'])."' where id='1'");
	if($res)
	{
?>
	<script type="text/javascript">
	alert("Home page content saved successfully.")
	</script>
<?php 
	}
}
$req=mysql_fetch_array(mysql_query("select * from home_content where id='1'"));
												
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> 
<script type="text/javascript">
      bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>

</head>

<body><form name="" accept-charset="utf-8" method="post" action="">

<table width="700">
  <tr>
    <td><textarea cols="100" rows="27" name="home_content">
                	<?php
						echo stripslashes($req['home_content']);
					?>
					
                </textarea></td>
  </tr>
  <tr>
    <td> <input type="submit" name="submit" value="Submit"></td>
  </tr>
</table>

</form>
                
</body>
</html>