I am having problem in maintaing value of variable through several pages(actually through same page but through many refresh).
The first time I get navigated to new page the value of variable is preserved and can be used by echo,but after refreshing the page that value cannot be reused,it shows error that the variable has no value.
I am making a webapp for chatting in php.
I want to show the name of user(sender) on every page(every page of sending message). So I am using code
<?php
$writtervar = $_POST['writter'];
echo $writtervar;
?>
I am taking input through a separate page,code is
<form action="ddd.php" method="post">
Enter your name <input type="text" name="writter" >
<input type="submit" id="submit" value="Press" >
</form>