I did something completely different now to separate the content returned by the Jquery POST callback…
In the callback, I receive just ONE echo and that is a confirmation that the user is logged on ( after running some backend PHP validation ). On this conformation I have a link that ( when clicked ) only refreshes the page, upon refreshing, the PHP Session will pick up that the user is logged on and display the content the user is allowed to see, by embedding the PHP tags and only echo’ing content based on the condition that the user’s Session exist.
Not sure if it is the most elegant way to do this, but it works for me.
Entry a bit old now, but thanks for your code stefanbar, I needed the same thing for my code.
I don’t really understand the use of this line:
but it was necessary.