I have used this code:
$value = $_POST['searcheditem'];
header("Location : anotherpage.php?myValue=".$value);
And then inside anotherpage.php:
echo $_GET['myValue'];
// make sure to sanitize this data
But when I push any button in anotherpage.php and it refreshes the page the value of $_GET['myValue']
is lost so I get the error index 'myValue' is undefined. What can I do?