Ok im querying the database and doing if statement on the name of a field, if name is this then set variable image to blank.gif. here is my code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
require_once("connect2.php");
$query = "SELECT id, title, description, url, type, tutorial FROM design_main.urls WHERE (type = 'tutorial') OR (type = 'article') ORDER BY id DESC LIMIT 5";
$result = mysql_query($query) or die (mysql_error());
$num = mysql_num_rows($result);
if($row[5] = 'article'){
$image = 'article.gif';
}
elseif($row[5] = 'photoshop'){
$image = 'ps.gif';
}
elseif($row[5] = 'php'){
$image = 'php.gif';
}
echo"<table width=\"100%\" border=\"0\">";
if($num > 0){
while($row = mysql_fetch_array($result, MYSQL_NUM)){
echo"<tr><td><span class=\"style2\" ><img src=images/$image> <b>$row[1]</b><br>$row[2]<br><i>$row[5]</i><br><br></span></td></tr>";
}
}
else
{
echo'<span class="style1">The calendar is experiencing technical difficulties. We apologize for the inconvenience.</span>';
}
echo"</table>";
?>
its hanging up on article and all my images are the article.gif. anyone see what im doing wrong?