I'm trying to develop a attirubute in the php code to display an error instead of nothing.
This is what I have so far.
$result = mysql_query("SELECT * FROM skituals WHERE id = '$id'");
while($row = mysql_fetch_array($result)){
echo $row['images'];
}
if (!$headline)
{
print ("error.jpg");
}
When someone does put in a wrong id into the address bar, the error.jpg is displayed, but when the id is right is right 'error.jpg is added to the echo statement.
Is this the wrong way to aproach this?