diff --git a/public/sample/final-work/twitter/post.php b/public/sample/final-work/twitter/post.php deleted file mode 100644 index 1cb0130..0000000 --- a/public/sample/final-work/twitter/post.php +++ /dev/null @@ -1,29 +0,0 @@ -prepare("INSERT INTO tweets (username, content) VALUES (?, ?)"); -$stmt->execute([$username, $content]); - -// index.phpにリダイレクト -header("Location: index.php"); -exit; -?> diff --git a/public/workspace/final-work/twitter/db.php b/public/workspace/final-work/twitter/db.php new file mode 100644 index 0000000..4fe3f05 --- /dev/null +++ b/public/workspace/final-work/twitter/db.php @@ -0,0 +1,20 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } + + return $pdo; +} +?> diff --git a/public/workspace/final-work/twitter/index.php b/public/workspace/final-work/twitter/index.php new file mode 100644 index 0000000..636f9d6 --- /dev/null +++ b/public/workspace/final-work/twitter/index.php @@ -0,0 +1,29 @@ + + + + + + + Twitterライク + + +

つぶやき投稿

+ + + + + +
+ +

タイムライン

+ + + + + diff --git a/public/workspace/final-work/twitter/post.php b/public/workspace/final-work/twitter/post.php new file mode 100644 index 0000000..05aca0b --- /dev/null +++ b/public/workspace/final-work/twitter/post.php @@ -0,0 +1,15 @@ + diff --git a/public/workspace/php/twitter/db.php b/public/workspace/php/twitter/db.php deleted file mode 100644 index 4fe3f05..0000000 --- a/public/workspace/php/twitter/db.php +++ /dev/null @@ -1,20 +0,0 @@ -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } - - return $pdo; -} -?> diff --git a/public/workspace/php/twitter/index.php b/public/workspace/php/twitter/index.php deleted file mode 100644 index 636f9d6..0000000 --- a/public/workspace/php/twitter/index.php +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Twitterライク - - -

つぶやき投稿

- - - - - -
- -

タイムライン

- - - - - diff --git a/public/workspace/php/twitter/post.php b/public/workspace/php/twitter/post.php deleted file mode 100644 index 05aca0b..0000000 --- a/public/workspace/php/twitter/post.php +++ /dev/null @@ -1,15 +0,0 @@ -