It is similar to the effect of SF. We click a title on the post list page to enter the topic of this post. After submitting a reply in the topic, click the back button of the browser and return it to the post. the list page is displayed, but I have a bug in this effect. If you do not submit a reply, click it once... it is similar to the effect of SF. We click a title on the post list page to enter the topic of this post. After submitting a reply in the topic, click the back button of the browser and return it to the post. the list page is displayed, but I have a bug in this result. If you do not submit a reply point once, you can return to the post list page. After submitting a reply, you need to click the return button twice to return to the post list page. if you submit two replies in this post, you need to click the return button three times to return to the post list page. Why?
This is the topic page tieba3.php of the post.
;
prepare("select id,title,content from topic where id=?"); $stmt->execute(array($title)); $res=$stmt->fetchall(PDO::FETCH_ASSOC); foreach($res as $v){ echo ''.$v['content'].''; } ?> prepare("select id,reid,content from reply where reid=?"); $stmt->execute(array($id2)); $res1=$stmt->fetchall(PDO::FETCH_ASSOC); foreach($res1 as $v2){ echo $v2['content']; } ?>
Tieba4.php
prepare("insert into reply(reid,name,content)values(:reid,:name,:content)"); $stnt->execute($_POST);header("location:http://localhost/tieba3.php?id=".$_POST['reid']);}?>
Reply content:
It is similar to the effect of SF. We click a title on the post list page to enter the topic of this post. After submitting a reply in the topic, click the back button of the browser and return it to the post. the list page is displayed, but I have a bug in this result. If you do not submit a reply point once, you can return to the post list page. After submitting a reply, you need to click the return button twice to return to the post list page. if you submit two replies in this post, you need to click the return button three times to return to the post list page. Why?
This is the topic page tieba3.php of the post.
;
prepare("select id,title,content from topic where id=?"); $stmt->execute(array($title)); $res=$stmt->fetchall(PDO::FETCH_ASSOC); foreach($res as $v){ echo ''.$v['content'].''; } ?> prepare("select id,reid,content from reply where reid=?"); $stmt->execute(array($id2)); $res1=$stmt->fetchall(PDO::FETCH_ASSOC); foreach($res1 as $v2){ echo $v2['content']; } ?>
Tieba4.php
prepare("insert into reply(reid,name,content)values(:reid,:name,:content)"); $stnt->execute($_POST);header("location:http://localhost/tieba3.php?id=".$_POST['reid']);}?>