开发者

session username match to

So when a logged on user posts a comment on my webpage, it automatical开发者_开发技巧ly posts their username next to their comment. using <? echo $rows['a_name']; ?>

I now want to create an edit link that will only appear on the posts that the logged in user has created. In other words I want to match the <? echo $rows['a_name']; ?> to the $_SESSION=['username'] username and if they match - display the edit link -... if not, then hide the edit link.

Any help, examples, ideas?


<?php if($rows['a_name']===$_SESSION['username']) { ?>
    <!-- edit link here -->
<?php } ?>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜