I've been trying to get this to work for alittle over a week and im about to lose hope in my capabilities. I need some help, someone who can write the working code and explain what is happening.
Basically, i want to display a message that is called from posts.php and have is display right in between the checkbox of the form and the submit button in my loginform. I don't just want a solution that can only be used for submitting forms, i want to be able to display a message anywhere in a website at any given time without being dependent on buttons being clicked or forms being submitted.
As an example, I used a form that if both username and password would be left blank it would display an error. I wanted to use this just as an example so others could understand what I was trying to accomplish easily. Let me stress again that I don’t want a solution dependent on form submissions or the form calling a javascript function, I want to be able to display a message anywhere in a section of a website at anytime. Without further adieu, here are the files: