I've trying to put alt text on images but seems to me that doesn't work. Here is how I try
// get the info from the db
$sql = "SELECT name, caption, alt FROM images order by id desc LIMIT $offset, $rowsperpage";
$result = mysqli_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
// while there are rows to be fetched...
while ($list = mysqli_fetch_assoc($result)) {
// echo data
echo "<img src=\"upload/".$list['name']."\" alt=\"".$list['alt']."\" /></a>";
echo $list['caption'];
With image and caption everything is fine. But in the html of the page I didn't see alt text.
update: var_dump($list)
array (size=3) 'name' => string '3ce08e141493823aeeded14f5dda6573.jpg' (length=36)
'caption' => string 'image 1' (length=14)
'alt' => string 'testing alt text 2' (length=18)