I do a paste effect on the Post content page Click Back can be directly back to the Post list page but if the reply content after the point returned but not back to the Post list page need another point to go back if you submit two replies you need to press three times to return to the Post list page the more you need to return the number of replies What's going on here?
Reply to discussion (solution)
Don't see the code, it's hard to say
Don't see the code, it's hard to say
Is that the code that you've been asking for the last few days?
If you are using form form, after submission is equivalent to enter a new page, point to return or the original page
The Ajax asynchronous commit will do what you want.
So many posts, which one knows who to whom
So many posts, which one knows who to whom
It's the following code. This is the Post home page is to submit content on this page once click Back not to the Posts list page
tieba3.php
;
<title></title>
Include "cookie.php";
?>
$pdo =new PDO ("Mysql:host=localhost;dbname=t1", "Root", "");
$title =$_get[' id '];
$stmt = $pdo->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 ']. ';
}
?>
$pdo =new PDO ("Mysql:host=localhost;dbname=t1", "Root", "");
$id 2=$_get[' id '];
$stmt = $pdo->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
if (Isset ($_post[' Reid ')) {
$pdo =new PDO ("Mysql:host=localhost;dbname=t1", "Root", "");
$STNT = $pdo->prepare ("insert into reply (reid,name,content) VALUES (: reid,:name,:content)");
$stnt->execute ($_post);
Header ("location:http://localhost/tieba3.php?id=". $_post[' Reid ');
}
?>
Header ("location:http://localhost/tieba3.php?id=". $_post[' Reid ');
And tieba3.php is obviously a content page, not a list page.
Header ("location:http://localhost/tieba3.php?id=". $_post[' Reid ');
And tieba3.php is obviously a content page, not a list page.
Yes, it's just a page that's inserted into the database. Replies submitted to the current page after submission and displayed is a page such as I post a reply I want to return to the Post list page click a Back button but not back to the Post list page
Do you have to change tieba3.php to a list page program file?
Do you have to change tieba3.php to a list page program file?
That would change the effect.
If you are using form form, after submission is equivalent to enter a new page, point to return or the original page
The Ajax asynchronous commit will do what you want.
I don't understand asynchronous commits, so I don't know how it works, not knowing if it's the effect I want.
3 floor people have answered you, if you point to the browser's return of course back to the previous page-that is, the page before you submit. If you click on your own Write back button, that is the return button of the jump link is not correct