开发者

How realize form success notify using CodeIgniter?

I have feedback non-ajax 开发者_JS百科form whitch create on CodeIgniter 2. I wanna to show notify after form successful submit. How do this, correctly?


Basic example, this is over-simplified so it can be understood easily:

Controller

if ($this->form_validation->run()) // Your logic that tells if the submit was OK
{
    $data['message'] = 'Thanks.';
}
else
{
    $data['message'] = 'There was an error.';
}
$this->load->view('my_view', $data);

View

<?php echo $message; ?>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜