I have a form on a page where the user has inputs to edit a XML file, the action for the form is to send it to a separate PHP script where the editing takes place after they hit submit. The script will either write successful or fail, either way I have it redirect back to the form page via a header. Is there an easy way to pass back a confirmation or failure message to the form page? I can do it in the URL but I rather keep that clean looking.
Share
The way that I’ve seen it done (and I personally use) is simply sessions.
Then somewhere else, in your library or function file or whatever:
Then in the view/page you could do:
This is pretty basic but you could expand it from there if you want multiple messages and so on. Bottom line is that I believe sessions are best for this.