I'm creating a site where a search form will produce a table of other members of my site. This table has different fields which tells a little about the member
Example: Age, Location, Gender, etc....
One of the fields will contain a camera icon if the member has a photo of themself in their profile. The below code is what I am using for this. The code works perfectly. The problem is when I try to place the code within the table field I continually get parse errors.
<?
$sql_username_check=mysql_query("select username from images where username ='$username'");
$username_check=mysql_num_rows($sql_username_check);
if($username_check>0){
echo "<img border=0 src=http://mysite.com/images/picture.jpg width=29 height=25>";
}else{
echo "";}
?>
Below is an example of how I am setting up my table results. All the other results work fine. Can anyone show me how to properly insert the above code to work in a field within the table? Thanks.
<td>".$result['state']."</td><td>".$result['gender'].
"</td><td >".$result['age']."</td</tr>\n";