Jane  Reid

Jane Reid

1667267100

Codeigniter Alert: An Easy Flashdata Alert for CodeIgniter

codeigniter-alert

An easy flashdata alert for codeigniter
This is just a simple alert..

How To Use

File

Put the Alert.php in the application/library
Put the alert_helper.php in the application/helper
Load the library automatically..

The library is work with the codeigniter 2.2 and 3.0

Set an Alert

  • NAME(String): Your alert name/type/class/whatever..
  • MESSAGE(String): Of course this is for the message..
  • NEXT REQUEST(Bool / Default: false): Set TRUE if not for next request.. I think you now about this if you have use a flashdata codeigniter

$this->alert->set(NAME, MESSAGE, NEXT REQUEST);

Display an alert

echo has_alert(NAME);
print_r(has_alert());

Sample

Controller

public function index()
{
    if(!auth_check('member')){
        
        // Alert will show after redirect
        $this->alert->set('alert-danger', 'Orang asing dilarang masuk!');
        redirect(base_url('auth/login'));
    }
    
    redirect(base_url());
}

public function login()
{
    if($this->input->post('do_login') AND !$this->do_login()){
        
        // This is not for next request
        $this->alert->set('alert-danger', 'Login gagal!', true);
    }
    
    $this->load->view('login');
}

View

<?php if(has_alert()):  
    foreach(has_alert() as $type => $message): ?>  
        <div class="alert alert-dismissible <?php echo $type; ?>">  
            <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
            <?php echo $message; ?>  
        </div>  
    <?php endforeach;  
endif; ?>

Very simple..
Thanks

Tweet your question to @d_nizh

Bahasa Indonesia http://kabisadenis.net/php/codeigniter/membuat-alert-pada-codeigniter-dengan-mudah/


Download Details:

Author: xdn27
Source Code: https://github.com/xdn27/codeigniter-alert

#codeigniter 

What is GEEK

Buddha Community

Codeigniter Alert: An Easy Flashdata Alert for CodeIgniter

Hire CodeIgniter Developer

Want to create unique, scalable web and app solutions?

At HourlyDeveloper.io, Expert CodeIgniter developer works particularly for you and your project.

You can Hire CodeIgniter Developer with an extensive variety of skill sets together with PHP, MySQL, PHP frameworks such as Laravel, CakePHP, and Zend, CMS, and e-commerce platforms such as WordPress, Drupal, Magento, WooCommerce, Shopify.

Consult with our experts: https://bit.ly/3hUdppScodeIgniter development services

#hire codeigniter developer #codeigniter developer #codeigniter development #codeigniter development company #codeigniter development services #codeigniter

Hire Codeigniter Developer - Hire CodeIgniter Developers or Programmers

One of the fastest, lightest, reliable, and completely capable frameworks for a business web app development is the Codeigniter framework from PHP. CodeIgniter provides out-of-the-box libraries to perform operations like Sending Emails, Uploading Files, Managing Sessions, etc.

Want to build an excellent web application for your business?

Then WebClues Infotech is the right place where you could find highly skilled and expert CodeIgniter developers for hire. Share us your requirement, Conduct desired candidate interviews, and finally choose the one best suitably, it is that easy with WebClues Infotech.

So what are you waiting for? Get going on the path to business growth with WebClues Infotech

For more inquiry click here: https://www.webcluesinfotech.com/contact-us/

Hire CodeIgniter Developer: https://www.webcluesinfotech.com/hire-codeigniter-developer/

Email: sales@webcluesinfotech.com

#hire codeigniter developers #hire codeigniter development expert #hire codeigniter developers #hire codeigniter developers or programmers #hire an offshore codeigniter development team #codeigniter programmer

Codeigniter Development Company| Codeigniter Web Developers-SISGAIN

SISGAIN brings you the best Codeigniter development services in New Jersey, USA. We provide you with applications that are safe and secure. Our team of Codeigniter web developers is experienced and skilled, they can give you a customized software application. With the help of our Codeigniter applications, we make the website world much easier. Codeigniter development helps to reduce the complexity. Our applications are simple, cost-effective, and elegant. Codeigniter applications development allows the developers to create broad solutions and provide them with great performance. We have PHP programming systems in our Codeigniter applications. For more information call us at +18444455767 or email us at hello@sisgain.com

#codeigniter development services #best codeigniter development company #codeigniter web developers #codeigniter development #codeigniter development company #software development

Jane  Reid

Jane Reid

1667267100

Codeigniter Alert: An Easy Flashdata Alert for CodeIgniter

codeigniter-alert

An easy flashdata alert for codeigniter
This is just a simple alert..

How To Use

File

Put the Alert.php in the application/library
Put the alert_helper.php in the application/helper
Load the library automatically..

The library is work with the codeigniter 2.2 and 3.0

Set an Alert

  • NAME(String): Your alert name/type/class/whatever..
  • MESSAGE(String): Of course this is for the message..
  • NEXT REQUEST(Bool / Default: false): Set TRUE if not for next request.. I think you now about this if you have use a flashdata codeigniter

$this->alert->set(NAME, MESSAGE, NEXT REQUEST);

Display an alert

echo has_alert(NAME);
print_r(has_alert());

Sample

Controller

public function index()
{
    if(!auth_check('member')){
        
        // Alert will show after redirect
        $this->alert->set('alert-danger', 'Orang asing dilarang masuk!');
        redirect(base_url('auth/login'));
    }
    
    redirect(base_url());
}

public function login()
{
    if($this->input->post('do_login') AND !$this->do_login()){
        
        // This is not for next request
        $this->alert->set('alert-danger', 'Login gagal!', true);
    }
    
    $this->load->view('login');
}

View

<?php if(has_alert()):  
    foreach(has_alert() as $type => $message): ?>  
        <div class="alert alert-dismissible <?php echo $type; ?>">  
            <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
            <?php echo $message; ?>  
        </div>  
    <?php endforeach;  
endif; ?>

Very simple..
Thanks

Tweet your question to @d_nizh

Bahasa Indonesia http://kabisadenis.net/php/codeigniter/membuat-alert-pada-codeigniter-dengan-mudah/


Download Details:

Author: xdn27
Source Code: https://github.com/xdn27/codeigniter-alert

#codeigniter 

I am Developer

1611112146

Codeigniter 4 Autocomplete Textbox From Database using Typeahead JS - Tuts Make

Autocomplete textbox search from database in codeigniter 4 using jQuery Typeahead js. In this tutorial, you will learn how to implement an autocomplete search or textbox search with database using jquery typehead js example.

This tutorial will show you step by step how to implement autocomplete search from database in codeigniter 4 app using typeahead js.

Autocomplete Textbox Search using jQuery typeahead Js From Database in Codeigniter

  • Download Codeigniter Latest
  • Basic Configurations
  • Create Table in Database
  • Setup Database Credentials
  • Create Controller
  • Create View
  • Create Route
  • Start Development Server

https://www.tutsmake.com/codeigniter-4-autocomplete-textbox-from-database-using-typeahead-js/

#codeigniter 4 ajax autocomplete search #codeigniter 4 ajax autocomplete search from database #autocomplete textbox in jquery example using database in codeigniter #search data from database in codeigniter 4 using ajax #how to search and display data from database in codeigniter 4 using ajax #autocomplete in codeigniter 4 using typeahead js