<?php
include('connection.php');
include('test.php');
include ('session.php');
header( 'Content-Type: text/html; charset=utf-8' );

$office=test_input($_GET['office']);
$officer=test_input($_GET['officer']);
$phone=test_input($_GET['phone']);
$no=test_input($_GET['no']);
$date=$_GET['date'];
$off_mar=test_input($_GET['off_mar']);
$offr_mar=test_input($_GET['offr_mar']);
$srno_mar=test_input($_GET['srno_mar']);
$phone_mar=test_input($_GET['phone_mar']);
$no_mar=test_input($_GET['no_mar']);
$email=test_input($_GET['email']);
$desg_mar=test_input($_GET['desg_mar']);
$desg=test_input($_GET['desg']);


$sql2="SELECT * from administrate1";

$id=1;
$result11=mysqli_query($GLOBALS["___mysqli_ston"], $sql2) or die('Query Failed: ' . mysqli_error($GLOBALS["___mysqli_ston"]));
while($row1=mysqli_fetch_assoc($result11))
{		
$ss=$row1['srno'];
$id=$ss+1;

}
mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");
$SQL1="INSERT INTO `administrate1` VALUES ('','$srno_mar','$id','$date','$office','$off_mar','$desg','$desg_mar','$officer','$offr_mar','$phone','$phone_mar','$no','$no_mar','$email','visible',NOW())"; 
//echo $SQL1;



mysqli_query($GLOBALS["___mysqli_ston"], $SQL1) or die ("Error Message5" . mysqli_error($GLOBALS["___mysqli_ston"]));
echo 1;


?>