i need to print this as a report, how do i export it to word or pdf with seeing exactly what is seen on the browser? because sometimes the format is disorganized. please help! thanks!


$userId = $_SESSION['userId'];

include "../../../_functions.php";


<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">  
<style type="text/css">
.tableHead {    font-family: "Myriad Pro Light", "Myriad Pro";
    font-size: 17px;
    font-style: normal;
    font-weight: bold;
    color: #FFF;
.tableContent {
    font-size: 13px;
    font-style: normal;
    color: #000;
<title>Untitled Document</title>

$dateNow = date("F d, Y"); 
$reportName = $_GET['title'];
$year = $_GET['year'];
$title = $_GET['title'];
$month = $_GET['month'];

<form method="post">
<table width="89%" border="0" align="center">
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td width="8%" rowspan="3"><img src="../../../_images/logo.png" width="71" height="77"></td>
  <td width="49%" rowspan="3">BANK OF MAKATI</br>
  #44 Sen. Gil Puyat Ave.,</br>
  Brgy. San Isidro, Makati City	</br>
  Tel: 729-5886 </td>
  <td width="7%" rowspan="3">&nbsp;</td>
  <td width="36%">&nbsp;</td>
  <td>Date Generated: 
    <?php echo $dateNow;?></td>
  <td height="21">&nbsp;</td>
<tr><td colspan="4">&nbsp;</td></tr>
  <td colspan="4" align="center"><strong><?php echo $title." REPORT";?></strong></td>
{ echo "<td colspan=4 align=center>From ".$from." to ".$to."</td>";
		case'01': $monthName = "January"; break;
		case'02': $monthName = "February"; break;	
		case'03': $monthName = "March"; break;	
		case'04': $monthName = "April"; break;	
		case'05': $monthName = "May"; break;	
		case'06': $monthName = "June"; break;	
		case'07': $monthName = "July"; break;	
		case'08': $monthName = "August"; break;	
		case'09': $monthName = "September"; break;
		case'10': $monthName = "October"; break;	
		case'11': $monthName = "November"; break;	
		case'12': $monthName = "December"; break;
  	echo "<td colspan=4 align=center>For the Month of  ".$monthName." on Year ".$year.	"</td>";}
  <td colspan="4">&nbsp;</td>
  <td height="25" colspan="4" align="center"><table border="1" cellspacing="0" cellpadding="0">
      <td width="121" align="center">Date Reported</td>
      <td width="95" align="center">Ticket#</td>
      <td width="151" align="center">ControlNum</td>
      <td width="207" align="center">Assigned To</td>
      <td width="119" align="center">Status</td>
      <td width="130" align="center">Last Updated</td>
        $catch=mysql_query("SELECT *
						   FROM trouble_ticket
						   WHERE _ticketStatus != 'Closed'
						   AND month(_dateReported) = '$month' AND year(_dateReported) = '$year'") or die('Error:'.query1.mysql_error());  
        while($array = mysql_fetch_array($catch))
			$assetId = $array['_asset_id'];
			$ticketNum = $array['_ticketNum'];
			$dateNow = date("Y-m-d");
			$status = $array['_ticketStatus'];
			$dateReported = $array['_dateReported'];
			$lastUpdated = $array['_dateUpdated'];
			$technicianId = $array['_technicianuser_accounts_id'];
			$catch1 = getAsset_Details($assetId);
            $array1 = mysql_fetch_array($catch1);
			$controlNum = $array1['_controlNum'];
			$catch2 = getUser_Details2($technicianId);
            $array2 = mysql_fetch_array($catch2);
			$techName = $array2['_firstName']." ".$array2['_lastName'];
			echo "<tr align='center'><td class='tableContent'>".$dateReported."</td>";
            echo "<td class='tableContent'>".$ticketNum."</td>";  
            echo "<td class='tableContent'>".$controlNum."</td>";
				echo "<td class='tableContent'>Unassigned</td>";
				echo "<td class='tableContent'>".$techName."</td>";
            echo "<td class='tableContent'>".$status."</td>";
				echo "<td class='tableContent'>Not yet updated</td>";
				echo "<td class='tableContent'>".$lastUpdated."</td>";
			echo "<input type=hidden name=title readonly style=border:hidden value=$title>";
			echo "<input type=hidden name=month readonly style=border:hidden value=$month>";
			echo "<input type=hidden name=year readonly style=border:hidden value=$year>";
      <td width="119" colspan="5" align="right">Total Pending Tickets: &nbsp;</td>
      <td width="130" align="center"><?php echo $count;?></td>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.