<?php

include("session_start.php");

include("session_check.php");include("database.php");

  if($_GET['submit']!="")

  {

	  

	  extract($_GET);

	  foreach($_GET['Field11'] as $key=>$value)

		{

		$Field11=$Field11.",".$value;

		}



	  //echo("insert into input_form(ward_office,survey_sheet_no,ward,sub_area,plot_no,society_name,owner,house_no,total_area,type,miscellaneous,informer,surveyor)values('$Field1','$Field2','$Field3','$Field5','$Field6','$Field7','$Field8','$Field9','$Field10','$Field11','$Field12','$Field22','$Field23')");

	  //exit;

	   $sql0=mysql_query("insert into input_form(ward_office,survey_sheet_no,ward,sub_area,plot_no,society_name,owner,house_no,total_area,type,miscellaneous,informer,surveyor)values('$Field1','$Field2','$Field3','$Field5','$Field6','$Field7','$Field8','$Field9','$Field10','$Field11','$Field12','$Field22','$Field23')");

	 $id=mysql_insert_id();

	  //echo("select * from input_form");

	 

	  //exit;

	   $sql=mysql_query("select * from input_form");

 $row=mysql_fetch_array($sql);

  }

  if($sql0!="")

  {

	  header("Location: index1.php?id=$id");

	?>

    <script language="javascript">

	alert("saved s");

	//window.location("index1.php");

	//window.name=id;

	</script>

    <?php } ?>

</head>



<body>

<form name="form" method="get" >

			<table border="1">

				<tr bgcolor="#e2e0cb">

					<th class="ex">Fields</th>

					<th class="ex">Field Values</th>

				</tr>

				<tr>

					<td class="ex">Ward Office</td>

					<td class="ex"><input type="text" name="Field1" maxlength="25" value="<?php print $row['ward_office'] ?>"></input></td>

				</tr>

				<tr>

					<td class="ex">Survey Sheet No :</td>

					<td ><input type="text" name="Field2" maxlength="5"></input></td>

				</tr>

				<tr>

					<td class="ex">Ward</td>

					<td class="ex"><select  name= "Field3">

					<option value="">--</option>

<?php



$result =mysql_query("select * from master_ward");

while($row=mysql_fetch_array($result))

{



?>

<option value="<?php print $row['wvalue'];?>"> <?php print $row['value'];?> </option>

<?php



}

?>

</select> </td>



				</tr>

				<tr>

					<td class="ex">Date</td>

					<td><input type="text" name="Field4" id="popup_container1" id="Field4" readonly="readonly"></input></td>

				</tr>

				<tr>

					<td class="ex">Sub Area</td>

					<td class="ex"><input type="text" name="Field5" maxlength="25"></input></td>

				</tr>

				<tr>

					<td class="ex">Survey No. / Plot No :</td>

					<td><input type="text" name="Field6" maxlength="15"></input></td>

				</tr>

				<tr>

					<td class="ex">Society Name :</td>

					<td class="ex"><input type="text" name="Field7" maxlength="25"></input></td>

				</tr>

				<tr>

					<td class="ex">Owner :</td>

					<td><input type="text" name="Field8" maxlength="50"></input></td>

				</tr>

				<tr>

					<td class="ex">House No:</td>

					<td class="ex"><input type="text" name="Field9" maxlength="5"></input></td>

				</tr>

				<tr>

					<td class="ex">Total Area :</td>

					<td class="ex"><input type="text" name="Field10" maxlength="25"></input></td>

				</tr>

				<tr>

					<td class="ex">Type:</td>

					<td class="ex"><input type="checkbox" name="Field11"value="Field11"> Field11 </input></td>

				</tr>

				<tr>

					<td class="ex">Miscellaneous :</td>

					<td><input type="text" name="Field12" maxlength="35"></input></td>

				</tr>

				<tr>

					<td class="ex">Informer:</td>

					<td><input type="text" name="Field22" maxlength="50"></input></td>

				</tr>

				<tr>

					<td class="ex">Surveyor:</td>

					<td class="ex"><input type="text" name="Field23" maxlength="50"></input></td>

				</tr>

				<tr >

					

					<td colspan="2" align="right"><input type="submit"  name="submit" id="submit" value="Next"></input></td>

					

				</tr>

			</table>

		</form>



</body>

</html>