刷新页面后,名称变为空

时间:2013-04-06 12:34:34

标签: php jquery mysql

我有一个website并没有按照我想要的方式运作。如果您输入名称和评论,它会在评论部分下面正确地写下来。但刷新时,名称将变为空。

Github上: https://github.com/thebestbestman123/my_magazine

1 个答案:

答案 0 :(得分:0)

我认为你的表格行标题是“名称”而非“评论者” https://github.com/thebestbestman123/my_magazine/blob/master/php/get_comments.php

$rowarray["name"] = $row["commenter"];

根据您的保存行名称: https://github.com/thebestbestman123/my_magazine/blob/master/php/add_comment.php

  

sprintf(“INSERT INTO评论(id,名称,评论,时间戳)   VALUES(null,'%s','%s',null)“

相关问题