Displaying html from a php string
How can i get the following string to actually display the html AS html. I want to se开发者_如何学编程e a clickable link that the user can click as well instead of just html.
$_SESSION['errortext'] = 'You have successfully logged in. <a href="">Click Here</a> or wait to be redirected.';
I did a search and couldnt find anything on it. Seems "Outputing HTML from a php string" is somewhat ambiguous as i was getting all manner of results in google.
Ok, so apparantly somewhere down the line i am actually escaping the HTML, my bad.
echo $_SESSION['errortext'];
change the quotes and try.
$_SESSION['errortext'] = "You have successfully logged in. <a href=\"\">Click Here</a> or wait to be redirected.";
精彩评论