
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<?php include '../projects/project_menu.php' /** calling of header(to make it uniform in all template file) **/?>
<div class="container home">
		<h3> View all the Projects</h3>
		<?php include "../connection.php" /** calling of connection.php that has the connection code **/ ?>
		<table class="table table-bordered">
              <thead>
                <tr>
                  <th width="60px">Project ID</th>
                  <th>Title</th>
                  <th>Details</th>
                  <th>Image</th>
				  <th>&nbsp;</th>
				  <th>&nbsp;</th>
                </tr>
              </thead>
              <tbody>
			  <?php 
				$result = mysql_query("SELECT * FROM project ORDER BY created_at DESC");
				
				while($data = mysql_fetch_object($result) ):
			  ?>
                <tr>
                  <td><?php echo $data->project_id ?></td>
                  <td><?php echo $data->project_title ?></td>
                  <td><?php echo $data->project_detail?></td>
				  <td><img src="../projects/project_img/<?php echo $data->project_image?>" style="padding:5px"  width="150px"/></td>
				    <td>
					<a href="updatebyId_project.php?project_id=<?php echo $data->project_id ?>">
						<button class="btn btn-info"> Edit </button>
					</a>
				  </td>
				  <td>
					<a href="deleteById_project.php?project_id=<?php echo $data->project_id ?>">
						<button class="btn btn-danger"> Delete </button>
					</a>
				  </td>
				</tr>
			  <?php
				endwhile;
				
			  ?>
              </tbody>
		</table>
		
</div>	
</div>
</body>
</html>
