-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #2
base: main
Are you sure you want to change the base?
Conversation
|
||
function delete_comment(){ | ||
$filename = "comment.csv"; | ||
$c_id = $_POST['c_id']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_idだとなんのIDかわからないのでcommet_idなどわかりやすいものにした方が良いと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
僕もよくレビューしてもらう時に変数のネーミングで怒られたりするのですが、変数のネーミングをしっかりする理由は業務目線になりますが、相手がパッとコードを見た時にどの変数が入っているかわかりやすいとエラーの改善箇所が見つけやすいのと、コード量が長くなっても変数がわかり易ければコードを追いやすい、さらに自分の後任の人が作業に入りやすくするためだと個人的には考えていて、変数の命名は僕も毎回すごい悩んだりするので意識してかくと自分もあとで見やすくなると思います!
?> | ||
<div class="comment_form"> | ||
<form action="" method='post' onsubmit="return add_confirm()"> | ||
<dl> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dl>dt+dd
良いですね。まさにここは使いどころですよね
} | ||
?> | ||
<div class="comment_form"> | ||
<form action="" method='post' onsubmit="return add_confirm()"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actionが空でも大丈夫でしょうか?可能であれば中身書いてもらった方が一般的なのでレビューしてる側としても安心できます
?> | ||
<div class="comment"> | ||
<p><?php echo $comment[2] ?></p> | ||
<p><?php echo $comment[3] ?></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これだとコメントは二つまでしか表示されないのではないでしょうか?
間違っていたらすいません。
index.php
Outdated
function judge(){ | ||
if($_SERVER['REQUEST_METHOD'] === 'POST'){ | ||
if(empty($_POST['title']) || empty($_POST['sentence'])){ | ||
$msg = "タイトル,本文のは必須入力です"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かいですが文言が間違っておりますね
index.php
Outdated
} | ||
fclose($fp); | ||
$file_array = array_reverse($file_array); | ||
$now = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$nowだとわかりにくいので
$page_num
でも良いかと思います
質素ですが、完成しました
レビューをお願いします