Hi
I have this if and else statement which is meant to load a alternative image if the image field in a mysql database is empty.
Here is the code
<img src="
<?php if($row_page['image'] == '') {
echo "http://localhost/images/{$row_page['titile']}.png";
}
else
{
echo $row_page['image'];
}?>" />"
This does work in loading the alternative image if the image field is empty.
But the major problem is that if there is a image in the database field, this statement just ignores it.
Can someone please point out what I am doing wrong!
Thanks