开发者

Displaying html from a php string

开发者 https://www.devze.com 2023-03-08 08:58 出处:网络
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.

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.";
0

精彩评论

暂无评论...
验证码 换一张
取 消