Fix 儲存功能的換行處理
This commit is contained in:
parent
f53dfe3798
commit
2a8971d2cb
@ -20,7 +20,7 @@ if (!empty($_POST["id"]) && !empty($_POST["delete"]) && $_POST["delete"] == "tru
|
||||
elseif (!empty($_POST['id'])) {
|
||||
$id = $_POST['id'];
|
||||
$title = $_POST['title'];
|
||||
$content = $_POST['content'];
|
||||
$content = nl2br($_POST['content']);
|
||||
// 修改成功
|
||||
if ($db->edit($id, $title, $content)) {
|
||||
header('Location: view.php?id='.$id);
|
||||
@ -33,7 +33,7 @@ elseif (!empty($_POST['id'])) {
|
||||
// 新增資料
|
||||
else {
|
||||
$title = $_POST['title'];
|
||||
$content = $_POST['content'];
|
||||
$content = nl2br($_POST['content']);
|
||||
// 修改成功
|
||||
if ($id = $db->insert($title, $content)) {
|
||||
header('Location: view.php?id='.$id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user