再简化下,
<form>
while($transrow……)
{//读出欲翻译的数据,显示在页面, 比如file:……;edit……<table>……
while($uirow……)
{ //也是从数据库中取数据,显示在页面,比如有人翻译为:
//file为:
//(radio) 文件 (vote)
//(radio) 文本 (vote)
//(radio) text [有新的翻译]
//以下为添加新翻译的代码:<td align="center" width="15%" height="19"><input type=radio name="transtext[<?echo $uirow["id"]?>]" checked ></td>
<td align="left" width="85%" height="19">
<input type="text" name="transtext[<?echo $uirow["id"]?>]" size="30" maxlength="30">
</td></tr>}
</table>
//transtext[<?echo $uirow["id"]?>]是多个项,我实现插入的时候只会插入一项,不懂是为什么,
//然后判断是否要插入数据库
<submit>
</form>
}哎呀,郁闷,半路出家来做这个,挺郁闷的,讲的不清楚,不知道哪位大虾肯留下email我把代码发给你,帮我看一看
<form>
while($transrow……)
{//读出欲翻译的数据,显示在页面, 比如file:……;edit……<table>……
while($uirow……)
{ //也是从数据库中取数据,显示在页面,比如有人翻译为:
//file为:
//(radio) 文件 (vote)
//(radio) 文本 (vote)
//(radio) text [有新的翻译]
//以下为添加新翻译的代码:<td align="center" width="15%" height="19"><input type=radio name="transtext[<?echo $uirow["id"]?>]" checked ></td>
<td align="left" width="85%" height="19">
<input type="text" name="transtext[<?echo $uirow["id"]?>]" size="30" maxlength="30">
</td></tr>}
</table>
//transtext[<?echo $uirow["id"]?>]是多个项,我实现插入的时候只会插入一项,不懂是为什么,
//然后判断是否要插入数据库
<submit>
</form>
}哎呀,郁闷,半路出家来做这个,挺郁闷的,讲的不清楚,不知道哪位大虾肯留下email我把代码发给你,帮我看一看
<input type=radio name="transtext[<?echo $uirow["id"]?>]"
<input type="text" name="transtext[<?echo $uirow["id"]?>]"
重名了
radio对象可不要,否则需要换名2、提交后只需检查transtext数组的内容是否改变了
而transtext数组的下标就是表中的id
$value = $transtext[$key];
$strSql="select * from transtext where transtext='$value'";
1.因为我所有提交的内容是放在一个form内的,提交完以后,刷新会提示"不重新发送信息,则无法刷新页面,请点击重试再次发送,"再次提交数据,每次刷新都会提交数据,应该是多次提交的问题,怎么解决,
2.我有一段分页显示的代码,
for ($i=1;$i< $page;$i++)
{
echo "<a href='Document.php?page=".$i."'>[".$i ."]</a> ";
}
echo "[".$page."]";
for ($i=$page+1;$i<= $page_count;$i++)
{
echo "<a href='Document.php?page=".$i."'>[".$i ."]</a> ";
}
$page_string = '';
if( $page == 1 )
{
$page_string .= '第一页|Previous|';
}
else
{
$page_string .= '<a href=?page=1>第一页</a>|<a href=?page='.($page-1).'>Previous</a>|';
}
if( ($page == $page_count) || ($page_count == 0) )
{
$page_string .= 'Next|尾页';
}
else
{
$page_string .= '<a href=?page='.($page+1).'>Next</a>|<a href=?page='.$page_count.'>尾页</a>';
}
echo $page_string;然而现在我想实现的是,当我当"next"或者从[1]跳转到[2]的时候,提交数据,就是分页提交,
<tr>
<td align="center" width="15%" height="19"><input type=radio name="transtext[<?echo $uirow[0]?>]" value=??????? checked ></td>
<td align="left" width="85%" height="19">
<input type="text" name=??????? size="30" maxlength="30">
</td></tr>radio中的value怎么关联到text,