Jeditable enabled only on user profile page when logged in
I know how to display code using an IF
statement in PHP
checking for $_SESSION
variables of the user currently logged in, but I am not sure how to enforce this check when javascript is involved.
More specifically, I want to follow 开发者_运维问答the Jeditable tutorial from http://www.appelsiini.net/projects/jeditable and make it so that fields are only editable to a logged in user when viewing his own profile. Viewing other profiles will only display content regularly.
Seems fairly simple, any ideas?
So you should embed jeditable.js only when user logged-in and only on his own page.
精彩评论