如何从以下代码动态发布值 我使用以下代码
<?php
$epages_sql=mysql_query("select * from epages");
while($epapers=mysql_fetch_array($epapers_sql))
{
?>
<table>
<tr bgcolor="#FFCCFF">
<td width="40%" height="30"><span class="style9"><?php echo $epapers['epage']; ?></span><input type="hidden" name="page_<?php echo $epapers['id']; ?>" value="<?php echo $epapers['epage']; ?>" /></td>
<td width="30%"><input type="file" name="file_<?php echo $epapers['id']; ?>" /></td>
<td width="30%"><input type="submit" name="submit_<?php echo $epapers['id']; ?>" value="Upload" class="btn_style"/></td>
</tr>
<tr bgcolor="#FFCCFF"><td height="20"></td><td></td><td></td></tr>
</table>
<?php
}
?>
<?php
$epages_sql=mysql_query("select * from epages");
while($epapers=mysql_fetch_array($epapers_sql))
{
if(isset($_POST['???'])) {
$name=$_POST['???'];
}
}
?>
How to post this values from the above code in ???what can i use ?
请帮我解决这个问题
答案 0 :(得分:0)
试试这个,在下面开始表之前使用表单并对表单进行操作
<?php
$epages_sql=mysql_query("select * from epages");
while($epapers=mysql_fetch_array($epapers_sql))
{
?>
<form name="myform" method="post" action="[youractionpage_name]">
<table>
<tr bgcolor="#FFCCFF">
<td width="40%" height="30"><span class="style9"><?php echo $epapers['epage']; ?></span><input type="hidden" name="page_<?php echo $epapers['id']; ?>" value="<?php echo $epapers['epage']; ?>" /></td>
<td width="30%"><input type="file" name="file_<?php echo $epapers['id']; ?>" /></td>
<td width="30%"><input type="submit" name="submit_<?php echo $epapers['id']; ?>" value="Upload" class="btn_style"/></td>
</tr>
<tr bgcolor="#FFCCFF"><td height="20"></td><td></td><td></td></tr>
</table>
</form>
<?php
}
?>