0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ボタンを押した時に処理を実行させたい時

Last updated at Posted at 2020-05-22

今回は投稿内容を編集し、編集完了ボタンを押したらdbの投稿内容を書き換える(更新する)というもの

if文で条件を指定してからデータベースへアクセスし書き換えるという流れ

prepare('UPDATE posts SET message=? WHERE id=?'); $statement->execute(array($_SESSION['message'],$_SESSION['posts_id'])); ?>

HTML文(ボタンの部分のみ)

これで修正完了するボタンを押すとphpが処理される

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?