<?php 



include "../db.php";

session_start();

if (isset($_POST['n_ref'])) 

{

 		

	$img_sql = "SELECT * FROM notes_img  WHERE ni_ref = '$_POST[n_ref]' ORDER BY ni_pos ASC";

    $img_res = mysqli_query($con,$img_sql);

    if ($img_total_rows=mysqli_num_rows($img_res)>0) {

        while ($img_row=mysqli_fetch_assoc($img_res)) {

            $img_path = "../upload/notes/";

            $img_sl = $img_row['ni_sl'];

            $img_name = $img_row['ni_name'];

            $img_pos=$img_row['ni_pos'];



            echo '<img src="'.$img_path.$img_name.'" width="100%" heig ht="" style="display: block;margin-left: auto;margin-right: auto;margin-bottom:7px">';

        }

 	}



}



 ?>