html add image from folder code example

Example 1: path in html

/   = Root directory
   .   = This location
   ..  = Up a directory
   ./  = Current directory
   ../ = Parent of current directory
   ../../ = Two directories backwards

Example 2: how to add image in html from a folder

|-> myhtmlfiles
      |-> index.html
|-> images
      |-> my_image.jpg

<img src="../images/my_image.jpg">

Example 3: how to add image in html from a folder

$conn = mysqli_connect("localhost", "root", "", "customer");
	$image_details  = mysqli_query($conn, "SELECT * FROM customer_table");
     while ($row = mysqli_fetch_array($image_details)) {     
		
      	echo "<img src='images/".$row['imagename']."' >";   
      
    }

Tags:

Css Example