从数据库中的内容回显会话变量??? [英] echoing a session variable from content within a database???
问题描述
大家好。 :)
我知道在回到另一个问题之前不会很久。
我刚刚创建了一个登录框在我的网站上,我遇到了一个问题,试图将错误回应给用户。页面内容在数据库中,我试图将echo $ _SESSION [''error'']放入;我得到的只是echo $ _SESSION [''error''];"而不是错误字符串。
有人可以建议更好的方法吗?我想将页面保留在数据库中但是我仍然必须让用户知道在需要时记录它们有问题。
谢谢,
Frank
Hello everyone. :)
I knew it wouldn''t be very long before I was back with another question.
I just created a login box on my site and I am having an issue with trying to echo an error back to the user. The page content is in a database and I tried to put echo $_SESSION[''error'']; and all I get is "echo $_SESSION[''error''];" instead of the error string.
Can someone please advise of a better way to do this? I want to keep the page in the db but yet I still have to let the user know that there was a problem logging them in if need be.
Thanks,
Frank
推荐答案
_SESSION [''error''];我得到的只是echo
_SESSION[''error'']; and all I get is "echo
_SESSION [''error''];"而不是错误字符串。
有人可以建议更好的方法吗?我想将页面保留在数据库中但是我仍然必须让用户知道在需要时记录它们有问题。
谢谢,
Frank
_SESSION[''error''];" instead of the error string.
Can someone please advise of a better way to do this? I want to keep the page in the db but yet I still have to let the user know that there was a problem logging them in if need be.
Thanks,
Frank
你需要使用分隔符。
<?php echo
You need to use delimiters.
<?php echo
这篇关于从数据库中的内容回显会话变量???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!