sainiweb 0 Newbie Poster
<?php 
session_start();

/*if (!isset($_SESSION['user']))
{
header("Location: index.php");
}*/
include ("include/header.php");
include ("include/dbc.php");
//require_once "Spreadsheet/Excel/Writer.php"; 

//define('FPDF_FONTPATH','./fpdf/font/');
//require('./fpdf/fpdf.php');

//require ('pdf.php');



$rowsPerPage = 10;
$pageNum = 1;
if(isset($_GET['page']))
{
    $pageNum = $_GET['page'];
}
$offset = ($pageNum - 1) * $rowsPerPage;

$_SESSION['From']=$_REQUEST['From'];
$_SESSION['To']=$_REQUEST['To'];


$sql = "SELECT * FROM daily_material_record LIMIT $offset,$rowsPerPage";
   $result = mysql_query($sql);
   $album_count = mysql_num_rows($result);

   $query1 = "SELECT * FROM daily_material_record";

   $count  = mysql_query($query1);

   $pagerow = mysql_fetch_array($count, MYSQL_ASSOC);

   $numrows = mysql_num_rows($count);
?>
<table width="90%" align="center">
<TR>
<TD width="25%"><?php include ("include/menu-view.php");?></TD>
<TD>&nbsp;&nbsp;&nbsp;</TD>
<TD valign="top">
<p><font color="990000" size="+1">Daily Material Record</font>
</p>
<form action="#" method="post" name="frm" ><br>
<br>
<br>
<table align="center" border="1">
<tbody>
<tr><td colspan="8" align="right"><A HREF="print_out.php" target="_blank">Print</A> | <a href="excel.php">Excel</a> | <a href="">Pdf</a></td></tr>
<td>From</td><td><input type="text" name="From" id="From">
<a href="javascript:NewCssCal('From','yyyymmdd')"><img src="./date_picker/images/cal.gif" width="16" height="16" alt="Pick a date"></a>
</td>

<td>To</td><td><input type="text" name="To" id="To">
<a href="javascript:NewCssCal('To','yyyymmdd')"><img src="./date_picker/images/cal.gif" width="16" height="16" alt="Pick a date"></a>
</td>


<tr>
<td>Date</td>
<td>Challan Number</td>
<td>Party Challan Number</td>
<td>Truck Number</td>

<td>Material</td>
<td>Quantity Sent</td>

<td>Crusher Name</td>
<td>Crusher Rate</td>



</tr>

<?php

while ($row = mysql_fetch_array($result)) {
echo "<tr><td>" . $row['date'] . "</td>";
echo "<td><a href='searchveiw-1.php' target='_blank'>" . $row['challan_number'] . "</a></td>";
echo "<td>" . $row['party_challan_number'] . "</td>";
echo "<td>" . $row['truck_number'] . "</td>";

echo "<td>" . $row['material'] . "</td>";
echo "<td>" . $row['quantity_sent'] . "</td>";

echo "<td>" . $row['crusher_name'] . "</td>";
echo "<td>" . $row['crusher_rate'] . "</td><tr>";
}

$maxPage = ceil($numrows/$rowsPerPage);

$self = $_SERVER['PHP_SELF'];

if ($pageNum > 1)
{

$page = $pageNum - 1;

$prev = " <a href=\"$self?page=$page\">[Prev]</a> ";

$first = " <a href=\"$self?page=1\">[First Page]</a> ";
}
else
{
$prev  = ' [Prev] ';       
$first = ' [First Page] '; 
}

if ($pageNum < $maxPage)
{
$page = $pageNum + 1;

$next = " <a href=\"$self?page=$page\">[Next]</a> ";
$last = " <a href=\"$self?page=$maxPage\">[Last Page]</a> ";
}
else
{

$next = ' [Next] ';      

$last = ' [Last Page] '; 

}

echo "<tr><td align='center' colspan='12'><br>";
//echo "<div align='center'>";
echo $first . $prev . " Showing page <strong>$pageNum</strong> of <strong>$maxPage</strong> pages " . $next . $last;
echo "</td></tr>";
?>

<?php include ("include/footer.php");
?>
</tbody>
</table>
</form>
</td>
</TR>
</table>
</td>

I want to convert values html to psd,excel and print out

values came from data bse and I want print only these value not all web page

plz help

Thanx