little information needed in PHP
<p>i am working on a project which is airways ticketing.</p>

<p>i am able to display the final ticket to the user but how can i give user the ability to print  it when he/she clicks on print button.</p>

<p>please help..</p>

<pre><code>    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;style type="text/css"&gt;
    #main {
position:absolute;

top:100px;
width:100%;
height:250px;
z-index:1;
}
#submit {
position:absolute;

top:300px;
width:100%;
height:42px;
z-index:2;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id="main" align="center"&gt;
&lt;?PHP
mysql_connect("127.0.0.1","root","");
mysql_select_db("cmc");
$id=$_REQUEST['id'];
$r=mysql_query("select * from manifest where transid=".$id);
$d=mysql_fetch_assoc($r);
?&gt;

&lt;table width="800" border="1"&gt;
&lt;tr&gt;
&lt;td colspan="6" align="center"&gt;HORIZON AIRWAYS PASSENGER TICKET&lt;/td&gt;

&lt;/tr&gt;
&lt;tr &gt;
&lt;td colspan="3" align="center"&gt;PNR NUMBER: &lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?php echo $d["pnrno."]; ?&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr &gt;
&lt;td colspan="3" align="center"&gt; PASSENGER'S NAME:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?php echo $d["name"]; ?&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr &gt;
&lt;td colspan="3" align="center"&gt;DATE OF ISSUE:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?PHP 
ini_set('date.timezone','asia/calcutta');
echo date("d/m/y"); ?&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr &gt;
&lt;td colspan="3" align="center"&gt;TIME OF ISSUE:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?PHP  
echo date("h/i/s"); ?&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr &gt;
&lt;td colspan="3" align="center"&gt;DATE OF JOURNEY:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?php echo $d["day"]."-".$d["month"]."-".$d["year"]; ?&gt;         &lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="6" align="center"&gt;NOT TRANSFERRABLE&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="3" align="center"&gt;PASSENGER NAME:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?php echo $d["name"]; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="3" align="center"&gt;SECTOR:&lt;/td&gt;
&lt;td colspan="3" align="center"&gt;&lt;?php echo $d["sector"]; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="134" align="center"&gt;FLIGHT #&lt;/td&gt;
&lt;td width="132" align="center"&gt;CLASS&lt;/td&gt;
&lt;td width="112" align="center"&gt;DATE&lt;/td&gt;
&lt;td width="130" align="center"&gt;DEP. TIME&lt;/td&gt;
&lt;td width="132" align="center"&gt;ARR. TIME&lt;/td&gt;
&lt;td width="120" align="center"&gt;STATUS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;?php echo $d["flight_no."]; ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $d["class"]; ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $d["name"]; ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $d["departure"]; ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $d["arrival"]; ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo "confirm"; ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
&lt;div id="submit" align="center"&gt;
&lt;form name="form1" method="POST"&gt;
&lt;input type="submit" value="Print" name="submit"/&gt;
&lt;/form&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
