我想在一个表的所有行中更新一个相同的列,有人可以帮我如何更新表吗?只有一个输入字段应该更新所有行的值。此代码不起作用,我知道 index 和 array 有问题。
<?php
<form method="post" dir="rtl" name="maxcharfield" >
<textarea onKeyDown="textCounter(this,'progressbar1',300)"
onKeyUp="textCounter(this,'progressbar1',300)"
onFocus="textCounter(this,'progressbar1',300)"
style="font-family:'B_yekan';" id="text" name="text" rows="0" cols="0" class="required"></textarea>
<div class="cleaner h10"></div>
<div style="font-family:'B_yekan';" dir="rtl" id="progressbar1" class="progress" ></div>
<script>textCounter(document.getElementById("maxcharfield"),"progressbar1",100)</script>
<input class="styled-button-8" style="margin-top:10px; float:right; margin-right:50px; font-size: 14px; padding: 5px 14px;" type="submit" value="save" name="Submit" />
<input style="font-family:'B_yekan';" type="reset" value="reset" id="reset" name="reset" class="submit_btn float_l" />
</form>
<?php
// for updating Check if button name "Submit" is active, do this
if(isset($_POST['Submit']) && $_POST['Submit'] == 'save')
{
$sql1="UPDATE `".$tbl_name."` SET `board`='".$_REQUEST['text']."' ";
$result1=mysql_query($sql1);
}
}
?>