Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to print or download the filtered query?
    text
    copied!<p>hello I'm super noob in web developing I have this project where in I would like to print or download the filtered query.. here is my code</p> <pre><code>&lt;form action="adminarchive.php" method="post"&gt; From: &lt;input name="from" type="text" class="tcal"/&gt; To: &lt;input name="to" type="text" class="tcal"/&gt; &lt;label for="select"&gt;&lt;/label&gt; &lt;select name="status" size="1" id="status"&gt; &lt;option value="Delivered"&gt;Delivered&lt;/option&gt; &lt;option value="Cancelled"&gt;Cancel&lt;/option&gt; &lt;/select&gt; &lt;input name="search" type="submit" value="Search" /&gt; &lt;input name="print" type="submit" value="Print Report" onclick="window.print()" /&gt; &lt;/form&gt;&lt;br /&gt; &lt;table width="589px" border="1px"&gt;&lt;tr&gt;&lt;th&gt;Client&lt;/th&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Unit Price&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;th&gt;TotalPrice&lt;/th&gt;&lt;th&gt;Date Ordered&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;th&gt;TrackNumber&lt;/th&gt;&lt;/tr&gt; &lt;?php if (isset($_POST['search'])) { $a = isset($_POST['from'])?$_POST['from']:""; $b = isset($_POST['to'])?$_POST['to']:""; $c = isset($_POST['status'])?$_POST['status']:""; $rest = mysql_query("SELECT * FROM delivered WHERE dateord BETWEEN '$a' and '$b' AND stats = '$c' order by dateord DESC"); while($row1 = mysql_fetch_assoc($rest)){ ?&gt; &lt;tr align="center" bgcolor="#00FFCC" style="font-size:10px"&gt; &lt;td&gt;&lt;?php echo $row1['customer']; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $row1['itemname'];?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row1['unitP']; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $row1['quant']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row1['totalP']; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $row1['dateord']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row1['stats']; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $row1['tracknumb']; ?&gt;&lt;/td&gt;&lt;/tr&gt; &lt;?php } } ?&gt; &lt;/table&gt; </code></pre> <p>I would like to print the table by pressing the print button just the table. can I possibly print a certain part of a page?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload