Answer the question
In order to leave comments, you need to log in
Confused with set_flashdata?
Task: After successfully adding a comment, display the message with flash data
Adding comments via the Comment() method
In the Posts controller
Comment() {
<?php $this->session->set_flashdata('message', 'Комментарий успешно добавлен'); ?>
}
<?php echo $this->session->flashdata('message'); ?>
<form action="/posts/comment" method="post">
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question