Thank you very much for your replies.
This all appears to be desired behavior. So if the user wants to enter & a m p ; then that is what gets posted and entered to the database. If they want to enter an actual ampersand: "&", then that also is what gets entered in the database. Quotation marks and other special characters also work fine. Furthermore, it appears to work very well even if validation failed and the form is reloaded.
Essentially it boils down to the use of two php functions:
$_POST[$key] = addslashes($_POST[$key]); // the very last thing done before writing to database
print "<input type='text' name='name' value='" . htmlspecialchars($_POST[$key],ENT_QUOTES) . "'>";
Any suggestions? 🙂
(I can't see when stripslashes() or html_entity_decode() would come into the picture, but then again I'm rather new)