Hello buddy, here it is. If you follow this logic you are able to do it. Good Luck!
Code:
<?php
if(!isset($_GET['p']))
{
echo '<a href="../test.php?p=action">Action</a>';
}
elseif($_GET['p'] == "action")
{
echo '$_GET EXAMPLE';
$a = 1;
/* $_POST, your checks, functions and etc. */
/* When your logical proccedure is done ... */
echo '<br>';
echo '<a href="../test.php?p=action&wert='.$a.'">$_GET EXAMPLE</a>';
echo '<br>';
}
else
{
echo 'This page doesn\'t exist.';
}
if(isset($_GET['wert']))
{
$wert = $_GET['wert'];
/* PROCCEDURES */
if($wert == 1)
{
echo 'Works';
}
else
{
echo 'Error';
}
}
?>
edit: As you said you can do a simple search form otherwhise if you are doing it as a website where people can log and do so on... Store their data using

.
The variable will stay there untill they logoff or clean their website active login sessions, except if you set a expire time for them.
Btw, make sure you use prepared statements and logical checks,foreigners may send bad queries to your databases, won't you lost your data