当我使用Xampp Mysql服务器打印帐单时,它的db有空值或空值bbut当我给出实际值时它不带任何值并且有错误没有找到db? [英] When I worked with Xampp Mysql server to print a bill its db has null or empty values bbut when I give the real values it doesnot take any value and have error No db found?

查看:62
本文介绍了当我使用Xampp Mysql服务器打印帐单时,它的db有空值或空值bbut当我给出实际值时它不带任何值并且有错误没有找到db?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?php

include('connection.php');

?>

<!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=iso-8859-1" />
<title>BILL OF ENTRY FOR HOME CONSUMPTION</title>
<link rel="shortcut icon" href="images/CMonopoly.jpg"/>
<script type="text/javascript" src="libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$(".edit_tr").click(function()
{
var ID=$(this).attr('id');
$("#first_"+ID).show();
$("#last_"+ID).hide();
$("#last_input_"+ID).show();
}).change(function()
{
var ID=$(this).attr('id');
var first=$("#first_input_"+ID).val();
var last=$("#last_input_"+ID).val();
var dataString = 'id='+ ID +'&price='+first+'&qty_sold='+last;
$("#first_"+ID).html('<img src="load.gif" />');


if(first.length && last.length>0)
{
$.ajax({
type: "POST",
url: "table_edit_ajax.php",
data: dataString,
cache: false,
success: function(html)
{

$("#first_"+ID).html(first);
$("#last_"+ID).html(last);
}
});
}
else
{
alert('Enter something.');
}

});

$(".editbox").mouseup(function()
{
return false
});

$(document).mouseup(function()
{
$(".editbox").hide();
$(".text").show();
});

});
</script>
<style>
body
{
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
padding:10px;
background-color:#FFF;
}
.editbox
{
display:none
}
td
{
padding:7px;
border-left:1px solid #0F9;
border-bottom:1px solid #0F9;
border-top:1px solid #0F9;
}
table{
    border-bottom-color:#0C3;
    border: 1px solid;

}
.editbox
{
font-size:14px;
width:29px;
background-color:#0F9fcc;

border:solid 1px #000;
padding:0 4px;
}
.edit_tr:hover
{
background:url(edit.png) right no-repeat #80C8E5;
cursor:pointer;
}
.edit_tr
{
background: none repeat scroll 0 0 #D5EAF0;
}
th
{
font-weight:bold;
text-align:left;
padding:7px;

border-right-width: 0px;
}
.head
{
background: none repeat scroll 0 0 #FFC;
color:#00000;

}

</style>
<link rel="stylesheet" href="reset.css" type="text/css" media="screen" />

<link rel="stylesheet" href="tab.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script type="text/javascript" src="tcal.js"></script>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

var popupWindow=null;

function child_open()
{

popupWindow =window.open('printform.php',"_blank","directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=950, height=400,top=200,left=200");

}
</script>
</head>

<body background="images/bg110.gif">
<form method="get" action="billcode.php">
<h3 align="right">Licence No:<input type="text" name="Licence"/></h3>
<h1 align="center" style="color:#093;">BILL OF ENTRY FOR HOME CONSUMPTION </h1> &nbsp;&nbsp;
<table width="1813">
<tr> <td>
port code <input name="Portcode" type="text" /></td>
<td> S=Sea<br />
    A=Air<br />
    L = Land<br/></td>
    <td>Prior Entry Stamp <input name="PriorEntryStamp" type="text"/></td>
    <td>Import Deptarment<br/>
    Serial No.
    <br/> <input name="SerialNo" type="text" class=""/><br/>
    Date <input name="Date" type="text" class="tcal"/></td>
    <td>
    Custom House
    <br/>
    Agent Code <input name="AgentCode" type="text"/></td>

<td> Importer code <input name="ImpoterCode" type="text"/></td>

<td> Importer's Name <input name="ImporterName" type="text"/><br />
Address<input name="Address" type="text" maxlength="250" size="100"/></td>
</tr></table>
<table width="1815">
<tr>
<td width="224"> Vessel's Name<input name="VesselsName" value="" /></td>
<td width="224"> Rotation no<input name="RotationNo" value="" /><br/> Date<input name="RotationDate" value="" class="tcal"/></td>
<td width="224"> line no<input name="LineNo" value=""/></td>
<td width="224"> Port Of Shipment<input name="PortofShipment" value=""/></td>
<td width=224>Country of Origin<input name="Countryorigin" value=""/>
and Code<input name="CountryCode" value=""/></td>
<td width="224">Country of Consignment<input name="Countryorigin" value=""/><br/>
(if different) and code<input name="CountryCode" value=""/></td>
<td width="1533"> Bill of Lading no.
  <input name="BillofLadingnot" value=""/>
  Date
    <input name="BillofladingDate" type="text" class="tcal"/></td></tr></table>

<table width="1815">
<tr>

<td width="232" align="center"> <b>Packages</b>

<table>
<tr><th>Number &amp; Discription</th><th>Marks &amp; Numbers</th></tr></table></td>
<td width="53" align="center" valign="top">Serial no</td>
<td width="269" align="center"><b>Quantity</b>

<table width="179" height="77"><tr><th>Unit code</th><td>Weight vol.<br/>no etc</td></tr></table></td>

<td width="206">
<table width="194"><tr><td width="176" align="center"><b>Goods</b></td></tr>
<tr>
<td align="center">Description</td>
</tr>
<tr>
<th>
&nbsp; &nbsp; &nbsp;  &nbsp; &nbsp;  &nbsp; &nbsp;  R.I.T.C. No *</th></tr></table></td>
<td>
<th>Custom Tariff Heading</th></td>
<td><th>Nature of Duty Code</th></td><td> <th>Assemble Value Under Section 14 Customs Act 1962</th></td>
<td width="210" align="center">Customs Duty
<table>
<tr><td>Rate Basic</td><td>Amount Basic</td>
<tr><td>Auxiliary<br/>
(Rs.)</td>

<td>Auxiliary<br/>
(Rs.)</td></tr>
</table>
</td>
<td width="124">C.E.T. Item <br/>Exemption<br/>Notification no.  <br/>&amp;<br/> Year </td>
<td width="104">Value Of Purpose of <br/>section 3 <br/> Customs Tariff<br/> Act , 1975</td>
<td width="267" align="center"><b>Additional Duty</b><table> <tr><td> <th>Rate Basic</th></td><td><th>Amount  Basic</th></td>
<td> <th>Total</th></td></tr></table></td>
</tr>

</table>
<table width="1815"><tr><td width="537">Gross Weight</td>
<td width="577">Total NoOf Packages(In Words)<input name="GrossWeight" value=""/></td><td width="668">Total Amount Of Duty (In Words) RUPEES<input name="TotalAmountofDuty" value=""/></td></tr></table>
<input name="" value="save" type="submit"/>
<input name="" type="button" value="Print" onclick="javascript:window.print()" style="cursor:pointer; float:left;" />

<!----Database code for above table starts here---->
<form method="get" action="">
 <div id="box1">
<ul id="boxes">

<table width="1779" height="126">
<tr class="head">
<th>SerialNo</th>
<th>Invoice Value(Foreign Currency)<br/>FOB/C&F/C&I/CIF  </th>
<th>Freight</th>
<th>Insurance</th>
<th>Currency Code</th>
<th>Exchange Rate</th>
<th>Loading/Local Agency Commision</th><th>Miscellaneous Charges</th><th>Total Value(in Rupees)</th><th>Landing Charges</th><th>Assemble Value(In Rupees)</th><th>DECLARATION</th>
</tr>
<?php

$da=date("Y-m-d");



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

$i=1;

while($row=mysql_fetch_array($sql))

{

$SerialNo=$row['SerialNo'];

$invoice=$row['invoice'];

$Freight=$row['Freight'];

$Insurance=$row['Insurance'];

$CurrencyCode=$row['CurrencyCode'];

$ExchangeRate=$row['ExchangeRate'];

$Commision=$row['Commision'];

$Miscellaneous=$row['Miscellaneous'];

$TotalValue=$row['TotalValue'];

$Landing=$row['Landing'];

$Assemble=$row['Assemble'];

if($i%2)

{

?>
<tr id="<?php echo $SerialNo; ?>" class="edit_tr">
<?php } else { ?>
<tr id="<?php echo $invoice; ?>" bgcolor="#f2f2f2" class="edit_tr">
<?php } ?>
<td class="edit_td">
<span class="text"><?php echo $Freight; ?></span>
</td>
<td>
<span class="text"><?php echo $Insurance; ?></span>
</td>
<td>
<span class="text"><?php echo $CurrencyCode; ?></span>
<td>

<span class="text"><?php echo $ExchangeRate; ?></span>
</td>
<td>
<span class="text"><?php echo $Commision; ?></span>
</td>
<td>
<span class="text"><?php echo $Miscellaneous; ?></span>
</td><td>
<span class="text"><?php echo $TotalValue; ?></span>
</td><td>
<span class="text"><?php echo $Landing; ?></span>
</td><td>
<span class="text"><?php echo $Assemble; ?></span>
</td>
<td>
<span class="text"><?php echo $Landing; ?></span>
</td><td>
<span class="text"><?php echo $Assemble; ?></span>
</td>

</tr>

<?php

$i++;

}

?>

</table>
<br />
<br /><br />
<input name="" type="button" value="Print" onclick="javascript:window.print()" style="cursor:pointer; float:left;" />
</li>
</ul>
</div>
</form><br/><br/>
<div class="head"><h2>DECLARATION</h2>
(Declaration to be signed by the Custom house Agent)
<br/>
<p>1.I/We declare that the contents of this Bill of entry for goods imported against.<br/>
&nbsp; &nbsp; Bill of Lading no...............................Dated ............................ are in accordance
<br/>&nbsp; &nbsp; with the Invoice No.................  dated ..................  and other  documents presented herewith.</p>

<p>2. I/We declare that I/We  have not receieved any other document or information showing  a different price, value, quantity
<br /> or discription of the said goods and that if at any time hereafter I/ We Receive any documents from the
<br/>importer showing a different  state of  facts,

<br/>

推荐答案

(document).ready(function()
{
(document).ready(function() {


(\".edit_tr\").click(function()
{
var ID=
(".edit_tr").click(function() { var ID=


(this).attr('id');
(this).attr('id');


这篇关于当我使用Xampp Mysql服务器打印帐单时,它的db有空值或空值bbut当我给出实际值时它不带任何值并且有错误没有找到db?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆