。对于数据库我使用mysql。但是当我点击提交按钮提交表单时,数据库正在更新,但是页面没有重定向到不同的位置。在使用CK编辑器进行更新后,页面不会重定向
<?php
$sql="select * from automation_full";
$query=mysql_query($sql_get);
$row=mysql_fetch_object($query_get);
$old_content=$row->column1;
if(isset($_POST['save']))
{
$new_content=$_POST['content'];
$sql="update table1 set content='$new_content' where key_id=1";
$query=mysql_query($sql);
if($query)
{
header("Location:index.php");
}
}
?>
<div class="custom-container-right-form">
<form action="#" method="post">
<textarea id="text" name="content"></textarea>
<script>
CKEDITOR.replace('content');
</script>
<input type="submit" id="submit-button" name="save" value="Update">
</form>
</div>
当我点击保存它应该更新表1和重定向到的index.php。但我的程序正在更新表,但不重定向到index.php ...但是当我不使用ck编辑器,它的工作完全正常....如何使它与ck编辑器一起工作?
你在控制台中得到了什么错误? –
没有错误什么那么...查询运行正常...表正在更新以及...但查询执行后,该页面不重定向到index.php ....它停留在相同的页面.... –