我在提交页面上有一个提交按钮,它返回空白且不更新,回显也是空白。
<?
if (isset($_POST['submit'])) {
$newtext = mysql_real_escape_string($_POST['text']);
$doTextEdit = "UPDATE `$database_main`.`texts` SET `texts`.`text` = '$newtext' WHERE `texts`.`id` = '$sid' LIMIT 1" or die(mysql_error());
$retval = mysql_query( $doArtistEdit, $main );
if(! $retval )
{
die('Could not update data: ' . mysql_error());
}
header("Location: ".$_SERVER['HTTP_REFERER']);
}
?>
这是表单代码
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" name="$ID" method="post">
Song Name : <input type="text" name="title" value="<?php echo $row_song['title']; ?>"> by Artist Name :<input type="text" name="artist" value="<?php echo $row_artist['artist']; ?>"><br><?php echo $sid; ?><?php echo $database_main; ?><?php echo $doTextEdit; ?>
Lyrics :<br><textarea name="text" cols="72" rows="20"><?php echo str_replace("\n","\n",$row_Recordset1['text']); ?></textarea><br>
<input type="submit" name="editlyrics" value="Edit"></form>