Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to export report in word or excel
    text
    copied!<p>i want to export this report format in word or excel please help me. with this code i am getting proper data from database now i want to export it.</p> <pre><code>&lt;form name="form1" method="post" action="daily.php"&gt; &lt;h1 style="padding-left:150px;"&gt; Daily Report &lt;/h1&gt; &lt;div class="report" style="overflow:auto;height:400px;"&gt; &lt;?php $q="select cid,gtotal from db_transaction where tdate='$dat'"; $a=mysql_query($q); echo '&lt;table border="1" class="curvedEdges"&gt;'; echo '&lt;th width="30"&gt;Sr &lt;/th&gt;&lt;th&gt; Customer Name &lt;/th&gt; &lt;th&gt;Services &lt;/th&gt; &lt;th&gt;Service By &lt;/th&gt; &lt;th&gt; Amount&lt;/th&gt;'; $i=1;$gd=0; while($row=mysql_fetch_array($a)) { $qa=mysql_query("select cname from db_customers where cid=$row[0]"); $cnm=mysql_fetch_array($qa); $sd=mysql_query("select service,price from db_sale_service where cid=$row[0]"); echo '&lt;tr&gt;&lt;td&gt;'.$i.'&lt;/td&gt;&lt;td&gt;'.strtoupper($cnm[0]).'&lt;/td&gt;&lt;td&gt;&lt;table&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;'; while($snm=mysql_fetch_array($sd)) { echo '&lt;tr&gt;&lt;td&gt;'.$snm[0].'&lt;/td&gt; &lt;td&gt;'.$snm[1].'&lt;/td&gt;&lt;/tr&gt;'; } $sd=mysql_query("select serviceby from db_sale_service where cid=$row[0]"); $snm=mysql_fetch_array($sd); echo '&lt;/table&gt;&lt;/td&gt;&lt;td&gt;'.$snm[0].'&lt;/td&gt;&lt;td&gt;'.$row[1].'&lt;/td&gt;&lt;/tr&gt;'; $i++; $gd+=$row[1]; } echo '&lt;tr&gt;&lt;td colspan="3" align="center"&gt;&lt;strong&gt;Tolday\'s Total &lt;/strong&gt;&lt;/td&gt;&lt;td colspan="2" align="center"&gt;&lt;strong&gt;'.$gd.'&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;'; echo '&lt;/table&gt;'; ?&gt; &lt;/div&gt; &lt;/form&gt; </code></pre>
 

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