Display a welcom backmessaege in WP


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. if(isset($_COOKIE['comment_author_'.COOKIEHASH])) {
  3. $lastCommenter = $_COOKIE['comment_author_'.COOKIEHASH];
  4. echo "Welcome Back ". $lastCommenter ."!";
  5. } else {
  6. echo "Welcome, Guest!";
  7. }
  8. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.