View Single Post
Old 05-22-2009, 08:31 AM   #1 (permalink)
TheBoom
 
Newb Techie

Join Date: May 2009

Posts: 3

TheBoom is on a distinguished road

Default my image upload please

hello

i made an image upload system.

but i have a problem, if i upload one file with one images its ok but if i upload another file with two images it shows the second image everywhere where is suppose to be one.

here is my coding

Quote:
body_command = mysql_query("SELECT descr, image1, image2 FROM books WHERE id=".$row["id"]." ");
$body = mysql_fetch_array($body_command);

if($row["image1"] OR $row["image2"])
{
if ($body["image1"] != "") {
if($body["image1"] != "")
$img1 = "<a href='books/images/$body[image1]' rel='shadowbox' target='_blank'><IMG src='books/images/".$row["image1"]."' width='150'height='120' border='0'></a>";
if($body["image2"] != "")
$img2 = "<a href='books/images/$body[image2]' rel='shadowbox' target='_blank'><IMG src='books/images/".$row["image2"]."' width='150' height='120' border='0'></a>";
echo("<CENTER>Images:<br>". $img1 . "&nbsp&nbsp". $img2 . "</CENTER> ");

}
}
some one could give me a hint what i messed up?

thank you
TheBoom is offline