I want a script which will echo a text from a form to a div tag every time i click the submit button.
i was able to do that in no time but i want the text to still b
You would need to keep adding to a session variable and best to use an array.
Like so;
0){
// add text to session array and escape for security
$_SESSION['text'][] = htmlspecialchars($_POST['text'], ENT_QUOTES);
}
?>
Edit: This only works for the current session, if you want to come back later and see the same list. You would need to store the values somewhere like a database.