I m building an website and i'm using the base64encode() and base64decode(). I send the base64encode(value) through and url and i receive and then i decode the value. On the page that i have the decoded value i have one button that goes to the previous page and i use the encode to encode again the value and send it. the previous page i decode that value and i encode again to send to the same page.
At the first time i receive the correct values but when i do more than 1 i get strange value. It is my code:
The first page: Here i receive one value and i decode it.
$tablename = base64_decode($_GET['tablename']);
In the end of the page i have on list with this code, here i send the encoded value:
$descricao = base64_encode($row["descricao"]);
$tablename = base64_encode($tablename);
?>
<a href="./gestaoalarme.php?descricao=<?=$descricao?>&tablename=<?=$tablename?>">
In the seconde page i receive the encoded value
$tablename=base64_decode($_GET['tablename']);
and i have that button that goes back and send the encode value.
<a href="./verdispositivos.php?tablename=<?=base64_encode($tablename)?>" class="btn Back btn-lg">
The first time results, but then not.