I am not sure if this is a possible method, so I am looking for advice.
I would like to create a journal where a user adds an entry that has a javascript date stamp, followed by the entry into a MySQL table:
Date1:
Journal information1...
<br><hr><br>
As the user adds another entry (the same format as above), the information follows on from the last entry in the table (not creating a new row in the table)
I want the previous entry to be hidden, so it doesn’t look like a continuous list to the user:
**/HIDDEN/**
<br>Date1:<br>
Journal information1...
<br>**/HIDDEN/**
<hr>
<br>Date2:<br>
Journal information2...
<br><hr><br>
I want to do something like:
<form action="" method="post">
<textarea name="journal">
<span style="visibility: hidden;"><?=htmlspecialchars($journal)?>(previous entry)</span>
<span id="date"></span>
(space for new entry)
<hr>
</textarea>
</form>
<script>
var date = new Date();
var year = date.getFullYear();
document.getElementById('date').innerHTML = date;
</script>
Dragging the old entry into the input textarea, and allowing the user to add more.
I am sure there is a better way to process this, but I couldn’t find anything like it online.
Your time is appreciated!