如果你能帮我解决这个问题,我的 php_self 编码有问题,这是我的代码:这是 php 代码
<?php
if (isset($_POST['submit']))
{
$id=$_REQUEST['id'];
$notes_en=$_REQUEST['notes_en'];
$notes_ru=$_REQUEST['notes_ru'];
$sql="UPDATE hostess SET notes_en='$notes_en',notes_ru='$notes_ru' WHERE id='$id'";
$result=mysql_query($sql);
if($result){
echo "<div id='edittxt'>successfully updated";
echo "<BR>";
echo '<td ><a href="index.php">View Results</a></div>';
}
else {
die('error'.mysql_error());
}}
?>
This here is the form code from which i ake the information
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>Notes</label></br><div id="note"><h1><textarea value="<?php echo $star['notes_en'];?>"><?php echo $star['notes_en'];?></textarea></h1></div></br>
<input name="id" type="hidden" id="id" value="<?php echo $star['id'];?>">
<input type="submit" value="submit" name="submit"></form>"
如果可能,请检查它,因为我一直在尝试修改它并且我没有得到任何结果,它不会给我错误,但它也不会更新数据库