Jump to content

php ordering


pranshu82202

Recommended Posts

I have a code

 

<?php
include('dbcon.php');
$sql = mysql_query("select * from money ORDER BY sno DESC "); 
$num=mysql_num_rows($sql);
$snumb=0;
echo '<form method="post" action="edit.php?action=trunc">';
echo '<input type="submit" value="TRUNCATE TEABLE">';
echo '</form>';

echo '<form method="post" action="del_mul.php">';

echo "<table border='1' id=hor-minimalist-a style=width:1200px>
<tr>
<th> S No. </th>
<th> Act. ID </th>
<th>Jisne Diye</th>
<th>Kisko diye</th>
<th>Kitne Diye </th>
<th>Wajah </th>
<th>Kisne bhare iss site main </th>
<th>Kiss time pe </th>
<th>Delete Entry</th>
<th>Sel for Operation</th>


</tr>";

while($row = mysql_fetch_array($sql))
{
++$snumb;
echo "<tr>";
  echo "<td>" . $snumb. "</td>";
  echo "<td>" . $row['sno'] . "</td>";
  echo "<td>" . $row['name1'] . "</td>";
  echo "<td>" . $row['name2'] . "</td>";
  echo "<td>" . $row['amm'] . "</td>";
  echo "<td>" . $row['rea'] . "</td>";
  echo "<td>" . $row['usname'] . "</td>";
  echo "<td>" . $row['time'] . "</td>";
  echo "<td><a href=edit.php?id=" . $row['sno'] . "&action=del>DELETE</a></td>";
echo '<td><input type="checkbox" name="mul_arr[]"  value='.$row[sno].'></td>';

  echo "</tr>";
}	 

echo '<input type="submit" value="DELETE SELECTED">';
echo '</form>';
?>

 

In this i thought that the "DELETE SELECTED" button should be below to the table but the button is getting printed above the Table...

 

Why is it so.......??????????????

 

And how to fix it ????????????

 

- Pranshu Agrawal

pranshu.a.11@gmail.com

Link to comment
https://forums.phpfreaks.com/topic/253238-php-ordering/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.