How to remember $_POST value when change the URL?

I have got two page.

page a.php

<form action="b.php" method="post">
<input id="a1" type="text" value="keyword" name="a1" />
<input type="submit" value="post"/>

page b.php

<a href="b.php?id=".$row["url"]."" target="_self" >".$row["title"]."'.$_POST["a1"].'</a>

$row[“url”],$row[“title”] and $row[“name”] are all query from mysql.
After b.php received the $_POST value from a.php, it combined to a new hyperlink with $row[“title”]. When click this hyperlink, the new value with “.$row[“name”].” in <UL> <LI>.

Now when the url change to b.php?id=“.$row[“url”].”, the $_POST value from a.php lost. How to deal with this problem? Thanks.

I try to use

$_COOKIE[“a1”] = $_POST[“a1”] ;


$_SESSION[“a1”] = $_POST[“a1”] ;

but after change the URL, the value still lost.

Dear Kalon: Please forgive me for my poor English.
Is your mean: add the $_POST[“a1”] in the a href=“b.php?id=”.$row[“url”].“”.$_POST[“a1”]."?
I worry about users will enter some symbols that the URL address not allow, and cause errors.

That’s about the simplest option. The only other ways are to use something like curl or a socket connection to load the post data into the headers when calling the next page.

Thanks friends, I have solved this problem. (:

One option is to save $_POST[“a1”] as a session variable when it is received in b.php and echo the session variable in your <a> instead of $_POST[“a1”].