<?php
include("config.php");
if(isset($_POST['submit']))
{
$address1=$_POST['address1'];
$address2=$_POST['address2'];
$address3=$_POST['address3'];
$address4=$_POST['address4'];
$invoiceno=$_POST['invoiceno'];
$orderno=$_POST['orderno'];
$dcno=$_POST['dcno'];
$tinno=$_POST['tinno'];
$date=$_POST['date'];
$dat1=$_POST['dat1'];
$dat2=$_POST['dat2'];
$dat3=$_POST['dat3'];
$sno=$_POST['sno'];
$Description=$_POST['Description'];
$amount=$_POST['amount'];
$quantity=$_POST['quantity'];
$unitprice=$_POST['unitprice'];
$Amou=$_POST['Amou'];



 $sql="insert into report set address1='{$address1}',address2='{$address2}',address3='{$address3}',address4='{$address4}',invoiceno='{$invoiceno}',orderno='{$orderno}',dcno='{$dcno}',tinno='{$tinno}',date='{$date}',dat1='{$dat1}',dat2='{$dat2}',dat3='{$dat3}',sno='{$sno}',Description='{$Description}',amount='{$amount}',quantity='{$quantity}',unitprice='{$unitprice}',Amou='{$Amou}'";

 mysql_query($sql)or die (mysql_error());
 }
?>
<html>
<head><title></title>
<style type="text/css">
.box1
{
border: 1px solid black;
margin-top: 20px;
width: 97%;
height: 80%;
}
.box2
{
width: 60%;
float: left;
margin-top: 30px;
margin-left: 40px;
}
.box22
{
width: 60%;
float: left;
margin-top: -209px;
margin-left: 365px;
}
.box33
{
width: 60%;
float: left;
margin-top: -212px;
margin-left: 694px;
}
.box44
{
width: 60%;
float: left;
margin-top: -212px;
margin-left: 1061px;
}
.box3
{
width: 15%;
float: left;
}
.box4
{
width: 85%;
float: left;
margin-top: 13px;
}
.don
{
width: 100%;
float: left;
}
.inpu
{ 
width: 20%;
}
table, tr, td {
 border: 1px solid #000;
 border-collapse: collapse;
 padding: 8px;
}
table {
margin: 0px auto;
width: 90%;
}
.table
{
width: 95%;
margin: 0 auto;
margin-top: 20px;
}

</style>
</head>
<!--<script type="text/javascript">
	function vetri()
{
		var tamil=document.getElementById('tamil').value;
		var eng=document.getElementById('english').value;
		var maths=document.getElementById('maths').value;
		var total= parseInt(tamil)+parseInt(eng)+parseInt(maths);
		document.getElementById('total').value=total;

		if(total>=400)
		{
		document.getElementById('grade').value="A";	
		}
		if(total>=350 && total<=399)
		{
		document.getElementById('grade').value="B";	
		}
		if(total>=410 && total<=500)
		{
		document.getElementById('grade').value="C";	
		}
		if(total>=35 && total<=99)
		{
		document.getElementById('grade').value="Fail";	
		}
}
</script>-->

<body>
<form method="post">
			<div class="box1">
				<div class="box2">
					<div class="don">
					<p class="box3">Address 1</p> <div class="box4"><input type="text" class="inpu" name="address1" id="address1" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
						<p class="box3">Address 2</p> <div class="box4"><input type="text" class="inpu" name="address2" id="address2"  /></div>
						<div style="clear:both;"></div>
					</div>	
					<div class="don">
						<p class="box3">Address 3</p> <div class="box4"><input type="text" class="inpu" name="address3" id="address3"   /></div>
						<div style="clear:both;"></div>
					</div>
					<div class="don">
						<p class="box3">Address 4</p> <div class="box4"><input type="text" class="inpu" name="address4" id="address4" ></div>
						<div style="clear:both;"></div>
					</div>
				</div>
				<div class="box22">
				<div class="don">
					<p class="box3">Invoice No</p> <div class="box4"><input type="text" class="inpu" name="invoiceno" id="invoiceno" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Your Order No</p> <div class="box4"><input type="text" class="inpu" name="orderno" id="yourorderno" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Our D.C No</p> <div class="box4"><input type="text" class="inpu" name="dcno" id="dcno" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Party's TIN No</p> <div class="box4"><input type="text" class="inpu" name="tinno" id="tinno" ></div>
					<div style="clear:both;"></div>
					</div>
				</div>
				<div class="box33">
				<div class="don">
					<p class="box3">Date</p> <div class="box4"><input type="text" class="inpu" name="date" id="date"   ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Date1</p> <div class="box4"><input type="text" class="inpu" name="dat1" id="dat1" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Date2</p> <div class="box4"><input type="text" class="inpu" name="dat2" id="dat2" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Date3</p> <div class="box4"><input type="text" class="inpu" name="dat3" id="dat3" ></div>
					<div style="clear:both;"></div>
					</div>
				</div>
				<div class="box44">
					<div class="don">
					<p class="box3">Sno</p> <div class="box4"><input type="text" class="inpu" name="sno" id="sno"   ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Description</p> <div class="box4"><input type="text" class="inpu" name="Description" id="Description" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Amount</p> <div class="box4"><input type="text" class="inpu" name="amount" id="amount" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Quantity</p> <div class="box4"><input type="text" class="inpu" name="quantity" id="quantity" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Unit Price</p> <div class="box4"><input type="text" class="inpu" name="unitprice" id="unitprice" ></div>
					<div style="clear:both;"></div>
					</div>
					<div class="don">
					<p class="box3">Amount</p> <div class="box4"><input type="text" class="inpu" name="Amou" id="Amou" ></div>
					<div style="clear:both;"></div>
					</div>
					
					
				</div>
		</div>
			<center><input type="submit" name="submit" id="submit" value="submit"></center>		
		
		<!--<div class="table">
		<table class="tab" style="margin-left: 8px;">
		
		<tr>
		<td rowspan=2>S.no</td>
		<td>Description</td>
		<td>Amount</td>
		<td>Quantity</td>
		<td>Unit Price</td>
		<td>Amount</td>
		</tr>
		<tr>
		<td >1L</td>
		<td>5L</td>
		<td>50L</td>
		</tr>-->
		<?php
	/*	$vetri=mysql_query("select * from studentmark order by id");
		$i=1;
			while($row=mysql_fetch_array($vetri))
			{
			$id=$row['id'];
			echo '<tr>';
			echo'<td>' .$id.'</td>';
			echo'<td>'.$row['tamil']. '</td>';
			echo'<td>' .$row['english']. '</td>';
			echo'<td>'.$row['maths']. '</td>';
			echo'<td>' .$row['total']. '</td>';
			echo'<td>' .$row['grade']. '</td></tr>';
		
		
		$i++;
		}*/
		?>
		</table>
		</div>
</form>		
</body>
</html>
