<?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>