$comment_author
.comments.php
file:<! - Check the value of $ comment_author: empty or not empty -> <? php if ($ comment_author == "") { ?> <! - Forms are visible, $ comment_author is empty -> <input type = "Text" tabindex = "2" name = "author" value = "Your name *"> <input type = "Text" tabindex = "3" name = "email" value = "Email *"> <input type = "Text" tabindex = "4" name = "url" value = "Your site"> <? php} else {?> <! - $ comment_author - filled, forms are hidden -> Glad to see you again <b> <? Php echo $ comment_author; ?> </ b>. You do not need to fill in anything. <! - Change input type to hidden to hide it -> <input type = "hidden" name = "author" value = "<? php echo $ comment_author;?>" /> <input type = "hidden" name = "email" value = "<? php echo $ comment_author_email;?>" /> <input type = "hidden" name = "url" value = "<? php echo $ comment_author_url;?>" /> <? php}?> <! - Do not forget to delete comments ->
Source: https://habr.com/ru/post/37842/
All Articles