<?php
$id = $_GET['id'];
$sql = "select * from biao where pid=".$id;
$res = mysqli_query($conn,$sql);
$num = mysqli_num_rows($res); //现有多少张图片
$sql1 = "select * from biao where id=".$id;
$res1 = mysqli_query($conn,$sql1);
$row1 = mysqli_fetch_assoc($res1);
$num1 = $row1['p_num'];
$p_name = $row1['p_name'];
?>
<form action="" method="post" enctype="multipart/form-data" name="form2">
<br>
<table width="750" border="1" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="25" width="550" align="center" valign="middle" bgcolor="#FFFFFF"><font size="5">添 加 图 片</font></td>
<td height="25" align="center" valign="middle" bgcolor="#FFFFFF"><input type="submit" name="fanhui" value="返回上一层"></td>
</tr>
</table>
<br>
<table width="750" border="1" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFCC">
<tr>
<td align="center" colspan="2">
<p align="left"> 现已上传图片<?php echo $num?>张:</p>
<p>图片名称1:<input type="text" name="name[]" size="25"><input type="hidden" name="tu1"/> <input type="file" name="pictures[]" id="file1" /></p><p></p>
<p>图片名称2:<input type="text" name="name[]" size="25"><input type="hidden" name="tu2"/> <input type="file" name="pictures[]" id="file2" /></p><p></p>
<p>图片名称3:<input type="text" name="name[]" size="25"> <input type="file" name="pictures[]" id="file3" /></p><p></p>
<p>图片名称4:<input type="text" name="name[]" size="25"> <input type="file" name="pictures[]" id="file1" /></p><p></p>
<input type="submit" name="upload" value="提交" />
</td>
</tr>
</table>
</form>
</body>
</html>