I'm new to PHP. So i was wondering, is it a good idea to use $_SESSION to display errors/alerts?
For example: on submit.php you can set $_SESSION['error']="The error Text..." and on form.php you can use if isset($_SESSION['error']) then echo $_SESSION['error'] and then just unset the session. unset($_SESSION['error']).
It obviously works but is it a good idea? Can i face any problems in the future?