只想在屏幕上显示第一个图像,并希望手动滑动图像,在图像屏幕上显示一个选项,指示要滑动,即使用户点击特定图像,它也应放大同一窗口
任何人都可以帮忙..?这是显示代码,在php
$con=mysql_connect("localhost","root","");
mysql_select_db("menu",$con);
$sql="select * from nonmenu where nid=$a";
echo "$sql";
$result=mysql_query($sql);
//$row=mysql_fetch_array($result);
$row=mysql_fetch_array($result);
<img src="upload/<?php echo $row['nphoto'];?>" height=120 width= 160 alt="" />
<img src="upload/<?php echo $row['nphoto1'];?>" height=120 width= 160 alt="" /> <img src="upload/<?php echo $row['nphoto2'];?>" height=120 width= 160 alt="" />
<img src="upload/<?php echo $row['nphoto3'];?>" height=120 width= 160 alt="" />
<img src="upload/<?php echo $row['nphoto4'];?>" height=150 width= 160 alt="" />
<img src="upload/<?php echo $row['nphoto5'];?>" height=150 width= 160 alt="" />
<img src="upload/<?php echo $row['nphoto6'];?>" height=150 width= 160 alt="" /> <img src="upload/<?php echo $row['nphoto7'];?>" height=150 width= 160 alt="" />
答案 0 :(得分:1)
首先在PHP代码的这个小小的平静中看到你的错误
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("menu",$con);
$sql='select * from nonmenu where nid="'.$a.'"';
echo $sql;
$result=mysql_query($sql);
?>
其次 “height =”120“width =”160“alt =”“/&gt; 而是尝试
echo '<img src= "'.$YOUR_URL.'" alt=""/>';