0

Hello,
I'm having a problem with my code. It seem to only echo out the picture name from my database and not the picture.

This is my code

search.php

 $result = mysql_query("SELECT * FROM all WHERE (`title` LIKE '%".$query."%') OR (`add_type` LIKE '%".$query."%')") or die(mysql_error()); 
        if(mysql_num_rows($result) > 0)
  {
            while($results = mysql_fetch_array($result))
   { 
$photo = $results['image']; 

echo "  ".$results['image']."<a href='http://www.mysite.org/br/s.php?id=$id'><img src='/cate/upload/ $photo' width='100%' height='100%'></a>";
}
}

This is where i save my picture -> /cate/upload/

I think i have to leave the $result code, the only thing i need is to transform the $result['image']; to echo out the picture, not the name of the picture.

2
Contributors
3
Replies
15
Views
3 Years
Discussion Span
Last Post by broj1
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.