I have a while loop to get information and within the loop i have another loop in order to get the information for images which are in a different table relation to the main loop... Gathering and displaying information is fine, getting the images relating to information is working ok accept when there is no image path in the image table.. (ie: if no one has uploaded a picture) It's not an actual image in Mysql, the the path to the image...
For EG:
Id 1 = No image and shows no image pic
Id 2 = Image and Shows the image
Id 3 = No Image but shows image from Id 2 (Should show no image pic)
Id 4 = Image and Shows the image
Id 5 = Image and Shows the image
Id 6 = No Image but shows image from Id 2 (Should show no image pic)
Id 7 = No Image but shows image from Id 2 (Should show no image pic)
$sql_props = mysqli_query($db_conx, "SELECT `image` FROM `images` WHERE `id`='$id' LIMIT 0,1");
while($lex = mysqli_fetch_array($sql_props)){
$proppic = $lex["image"];
}
$check_pic = "$proppic";
if (file_exists($check_pic)) {
$pr_spic = "<img src=\"$proppic\" width=\"100px\" height=\"100px\" border=\"0\" />";
} else {
$pr_spic = "<img src=\"images/nopimg.png\" width=\"100px\" height=\"100px\" border=\"0\" />";
}
Thank you and hope someone can help with this please :)
$check_pic = "$proppic";What is this supposed to do?