Use Flashdata for one-time alerts!
xxxxxxxxxx
/// In Controller
public function add_item() {
// Your controller codes
$this->session->set_flashdata('success','Item is added successfully!');
redirect("webview/addItem");
}
/// In View
<body>
<!-- Alert -->
<?php if($this->session->flashdata('success')) { ?>
<div>
<?= $this->session->flashdata('success'); ?>
</div>
<?php } ?>
</body>