I have some php code $_SESSION['username'] and I need to display it using html with something like <p>the username here</p>. I heard you might be able to do this using echo in PHP but Im not sure how. Thanks for any help.
I have some php code $_SESSION[‘username’] and I need to display it using html
Share
or
You should really run it through
htmlspecialcharsto avoid breaking your HTML syntax (for example if the user’s name contains</p>or something, or if they attempt an XSS attack):