I’m brand new to working with php & mysql and my guru can’t answer this question so I thought I’d try here. :>)
I can’t figure out how to get a pic to load from the site instead of pulling it from the db (see line 6 below).
I’ve tried:
<?php
if (strlen($row_rsDirectoryHead['breedPic']) > 1)
{
echo $row_rsDirectoryHead['breedPic'];
} else {
<img src="DirectoryPics/dirNoPic.jpg" width="225" height="200" />;
}
?>
but line 6 (<img src…) shows a syntax error. If I put a text string there (echo “some words”) it works. I’ve tried putting " " around line 6 and/or including the echo command but neither works. What would the correct syntax be for that line? I don’t want to have to go in and put the pic into every one of the 160+ breed records so any help will be appreciated. TIA! :>)