Why does this code not go back to the Post list page when I submit a reply and click the Bounce button?

Source: Internet
Author: User
It's like an effect of SF. We click on a heading in the Posts list page to enter the topic inside the topic after the submission of the post reply and then click the Browser Back button and then back to the Post list page, but I do this effect has a bug is that if you do not submit a reply point can be returned to the Post list page After submitting a reply, you need to click the two Return button to return to the Post list page if you submit two replies in this post, you need to click the three Return button to return to the Post list page.

This is the topic page of the post tieba3.php


  
   
  ;    <title></title>        
      
  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 ($id 2));    $res 1= $stmt->fetchall (PDO::FETCH_ASSOC);     foreach ($res 1 as $v 2) {echo $v 2[' 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's like an effect of SF. We click on a heading in the Posts list page to enter the topic inside the topic after the submission of the post reply and then click the Browser Back button and then back to the Post list page, but I do this effect has a bug is that if you do not submit a reply point can be returned to the Post list page After submitting a reply, you need to click the two Return button to return to the Post list page if you submit two replies in this post, you need to click the three Return button to return to the Post list page.

This is the topic page of the post tieba3.php


  
   
  ;    <title></title>        
      
  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 ($id 2));    $res 1= $stmt->fetchall (PDO::FETCH_ASSOC);     foreach ($res 1 as $v 2) {echo $v 2[' 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']);}?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.