prepare($sql);
$stmt -> bindValue(":delete_id", $delete_id, PDO::PARAM_INT);
$stmt -> execute();
}
// 受け取ったデータを書き込む
if (isset($_POST["content"])) {
$content = $_POST["content"];
$sql = "INSERT INTO bbs (content, updated_at) VALUES (:content, NOW());";
$stmt = $pdo->prepare($sql);
$stmt -> bindValue(":content", $content, PDO::PARAM_STR);
$stmt -> execute();
} ?>
paiza掲示板
投稿フォーム
発言リスト
prepare($sql);
$stmt -> execute();
?>
id |
日時 |
投稿内容 |
|
fetch(PDO::FETCH_ASSOC)) { ?>
= $row["id"] ?> |
= $row["updated_at"] ?> |
= $row["content"] ?> |
|