session()->setFlashdata('success',"Welcome to Dashboard!");
<link rel="stylesheet" href="<?=site_url('public/template/') ?>plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css"> <script src="<?=site_url('public/template/') ?>plugins/sweetalert2/sweetalert2.min.js"></script>
<script> $(function() { // Sweet Alert swal = Swal.mixin({ swal: true, position: 'top-end', showConfirmButton: false, timer: 3000 }); //Sweet Alert <?php if(session()->has('success')){ ?> swal.fire({ icon: 'success', title: 'Good', text: '<?php echo session()->getFlashdata('success'); ?>' }); <?php } ?> <?php if(session()->has('error')){ ?> swal.fire({ icon: 'error', title: 'Oops', text: '<?=session()->getFlashdata('error'); ?>' }) <?php } ?> }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)