
<?php
  $db = mysqli_connect("49.12.125.236","patiltec_anand","Asd123!@#","patiltec_loginsystem1");
  $result = mysqli_query($db, "SELECT * FROM `postsbyusers`  ORDER BY `postsbyusers`.`date` DESC");
?>

<!DOCTYPE html>
<html>
<head>
<title>imagedelete2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<style>
body{font-family:arial;}
tr:hover{background-color:greenyellow;}
table, th, td{ border:1px solid black;border-collapse: collapse;}
td{padding:5px;}
</style>

</head>

<body bgcolor="ghostwhite" style="">
    

<table style="font-family:arial; border:1px solid black; margin:5px auto;">
	<tr>
	<td bgcolor="deepskyblue"><b> <center> ID</center></b></td>
	<td bgcolor="lawngreen"><b>User Name </b></td>
	<td bgcolor="Lavender"><b>Subject </b></td>
	<td bgcolor="Khaki"><b>Image Name </b></td>
	<td bgcolor="LightBlue"><b>Post Text &nbsp; &nbsp; &nbsp;<a href='../login.php'>  HOME</a></b></td>
	<td bgcolor="LightSeaGreen"><b> Date </b></td>
	<td bgcolor="OrangeRed"><b> Action </b></td>
	</tr>
	<?php
	$i=0;
	while($row = mysqli_fetch_array($result)) {
	?>
	<tr class="<?php if(isset($row)) echo $row;?>">
	<td><?php echo $row["id"]; ?></td>
	<td><?php echo $row["name"]; ?> </td>
	<td><?php echo $row["subject"]; ?></td>
	<td><a href='../images/<?php echo $row["image"]; ?>'><?php echo $row["image"]; ?> </a> </td>
	<td><?php echo $row["image_text"]; ?></td>
	<td><?php echo $row["date"]; ?></td>
	<td> <a href="imagedelete2procces.php?id=<?php echo $row["id"]; ?>"> Delete </a> 
	</td>
	</tr>
	<?php
	$i++;
	}
	?>
	</form>
</table>


</body>
</html>