我没有细看,估计问题在
  [php]
   print_r( "<IMG SRC=\"showphoto2.php? $PicNum=$row->PicNum\"width=32 height=32>"); 
  [/php]
这一句上,提供参考:
  打印出  $row->PicNum 等,确认sql没有问题后,就出在显示上了!
         提醒:
       你上传图片是的表单的type属性设置了吗?
       很容易忽略的!
                                                    Davy

解决方案 »

  1.   

    Sorry!是表单的enctype属性设置成"multipart/form-data"
      

  2.   

    在showphoto2.php中检查$PicNum的值
      

  3.   

    print_r( "<IMG SRC=\"showphoto2.php? $PicNum=$row->PicNum\"width=32 height=32>"); 
    改为
    print( "<IMG SRC=\"showphoto2.php?PicNum=$row->PicNum\"width=32 height=32>");
      

  4.   

    print_r( "<IMG SRC=\"showphoto2.php? $PicNum=$row->PicNum\"width=32 height=32>"); 
    $PicNum在PHP里变量
    要CODE看Faq
      

  5.   

    http://blog.csdn.net/kingerq/archive/2004/10/06/125789.aspx
      

  6.   

    表单的enctype属性是设置成"multipart/form-data",这样呀,还有$PicNum的值也正确,但就是显示不出图片,天啊!为什么???,有没有其他方法,最好有运行成功的源码,谢~
      

  7.   

    两处修改:
    1.
    print_r( "<IMG SRC=\"showphoto2.php? $PicNum=$row->PicNum\"width=32 height=32>"); 
    改为
    print( "<IMG SRC=\"showphoto2.php?PicNum={$row->PicNum}\"width=32 height=32>");
    2.
    $result=mysql_query("SELECT * FROM Images WHERE PicNum=$PicNum")
    改为
    $result=mysql_query("SELECT * FROM Images WHERE PicNum={$_POST['PicNum']}")