Category: PHP

It is safe to display confirmation alert before deleting a record from MySQL database table.

If the user has accidentally clicked the delete button on the wrong record then it has a choice whether to delete or cancel it.

Confirm box can easily add using confirm() method.

But in this tutorial, I am using Bootstrap Bootbox.js library to display confirm box.

With jQuery AJAX delete a record from the MySQL database with PHP on confirmation.

Confirmation alert before delete record with jQuery AJAX

AJAX JQuery PHP

The poll system used by the site administrator to get the users views on the topic or a product.

The user can select an option and submit a vote.

The overall percentage of the option will display after submit.

In this tutorial, I show how you can create a poll system with jQuery AJAX.

Online Poll and Voting System with jQuery AJAX

AJAX JQuery PHP

By creating dynamic dependent dropdown the user is restricted to select an item to view data on another dropdown element.

Based on each selection data is changed in the dropdown.

The common example of this – country and state element in the form. According to the selected country state is been auto-populated.

I am using $http service in AngularJS to send a request to fetch records from MySQL database with PHP.

In the demonstration, I am creating two dropdowns – state and users. According to the state selected from the first dropdown auto-populate users list in the second dropdown.

How to Auto-populate Dropdown with AngularJS and PHP

AJAX AngularJS How To PHP

Pagination gets complicated when to find specific groups of records when there is a large number of records are available.

By adding a search filter with pagination makes easier for the user to easily find records e.g. filter list by country, department, name etc.

It is easier to add pagination using pagination library in CodeIgniter.

In this tutorial, I am using the SESSION to store search value and filter the pagination list.

Pagination with search filter in CodeIgniter

PHP

With the use of Speech Recognition API, you can enable the web browser to take speech input on the page and convert it into text.

For accessing this on the page need to allow microphone access by the user.

In this tutorial, I am creating an example where allowing the users to search posts by speech. On the basis of speech recognition display response on the screen using jQuery AJAX.

How to Add Speech Recognition to the website - JavaScript

AJAX How To Javascript JQuery PHP

In CodeIgniter Model are the PHP classes where all database related manipulation is done e.g. fetching records, insert, update, and delete records.

Within this, all data processing logic is done.

All model files are managed in application/models directory and they are load and access by the controller.

How to create and load Model in CodeIgniter

How To PHP

It is time-consuming to delete records one by one from the list.

To make deletion process easier for the users by allowing them to select multiple records using checkboxes.

Execute delete query according to the selected checkboxes.

In the demonstration, I am displaying records from the MySQL database table and add a checkbox on each row. Use single submit button to delete selected records with PHP.

Delete multiple selected records with PHP

DataBase PHP

If there is the registration form on the website then you need to make sure that the username or email must be unique.

The user will login with the selected username next time when it comes to the website.

You can either check it after submitting the form or while entering it.

In the demonstration, I am creating a simple registration form in CodeIgniter where check the entered username with Angular and insert the record if the username is available.

Live username availability check with AngularJS in CodeIgniter

AngularJS PHP