Author: <span class="vcard">Yogesh Singh</span>

Logical operators are used to comparing multiple relational expression. In nesting where one if statement within another if statement because of that in the program, there are multiple statements will…

Python

For controlling the flow of the program by making conditions on that basis specific block of code will execute. If the statement is being used for making condition or decision…

Python

Comments are a line of code which is not read and executed as part of the program. It is very useful while editing and debugging the program.

Python

Dictionary in Python is similar to an associative array in PHP.  Dictionary are create using curly braces {} inside it the key is separated with items using a colon (:).…

Python

In Python, a sequence is a set of ordered list. They are differentiated by their index number. The index starts from zero. Two basic types of sequence in Python are list and tuple.

Python

Variables are the temporary placeholder for storing the value which has a unique name. In Python, you don’t need to declare the type of variable, this is done internally according to the value assigned.

Declare a variable in Python

Python

Autocomplete search element show suggestion based on user input e.g. listing all products which start with character ‘a’.

For implementing this in the program you need to send AJAX when a keyup event triggers on an input element.

What in the demonstration?

Show an input box for searching users and show the list of the result based on input. When the users select any of the items from the suggestion list then fetch details of the selected value and display it on the screen.

Make Autocomplete search with jQuery AJAX

AJAX Jquery PHP

Sometimes it requires to auto populate data on the element based on selection on another element e.g. City names based on a state.

You can do this with the only PHP but it required you to submit every time on selection.

This solves your problem but it is little frustrating because it submits every time even if the selection is right or wrong.

For making it better you can use AJAX with jQuery that loads new data and removes old one on each selection.

In the demonstration, I am creating a Department drop-down list and based on the option selection show all existing users of that department on another Dropdown.

How to Auto populate dropdown with jQuery AJAX

AJAX Jquery PHP

A Login page is one of the basic requirement when creating a registration based website where the user can register to the website and sign in to its account to manage.

In this case, you can use AJAX to create an user-friendly login page.

Which checks the entered username and password in the MySQL database table without reloading the web page. If the user is not available then show an error message on the screen otherwise redirect the user to a new page.

Login page with jQuery and AJAX

AJAX Jquery PHP

With login page allowing the users to enter in the website and manage its content. It important to initialize the $_SESSION when the user successfully logged in.

This helps to detect the user is actual logged in or not when going to another web pages and also display content according to it.

Create simple login page with PHP and MySQL

PHP