Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script language="JavaScript">
- function confirmDelete(){return confirm('Are you sure you want to delete this?');}
- </script>
- <?php
- $con=mysqli_connect("localhost","root","","testorder");
- /*if($con!=null)
- echo"Sucess";*/
- $result=mysqli_query($con,"SELECT * FROM orders WHERE IDTYPE>0 " );
- if(!$result)
- die("connot");
- $data=array("ID","IDType","Type","Price","No","PriceResult","Delete");
- echo"<center>";
- echo"<h1><u>DELETE</u></h1>";
- echo"<table border=1>";
- echo"<tr>";
- for($i=0; $i<count($data) ; $i++)
- echo"<td>".$data[$i]."</td>";
- echo"</tr>";
- while($row=mysqli_fetch_array($result,MYSQLI_NUM))
- {
- echo '<form name="frmDelete'.$row[0].'" method="post" action="d.php">'."\n";
- echo'<tr>';
- for($i =0; $i<6 ;$i++)
- echo "<td>".$row[$i]."</td>";
- echo '<input type="hidden" name="id" value="'.$row[0].'">';
- echo '<td><input type="submit" value="Delete" onClick="return confirmDelete();" ></td>';
- echo'</form>';
- echo'</form>';
- echo '<tr/>';
- }
- echo"</table>";
- $result=mysqli_close($con);
- echo"<br/><input type='button' onClick='window.history.back()' value='Back'>";
- echo"</center>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment