Makitweb Posts

Loop use to execute the same block of code single or multiple times in the program.

With this, you can do more with less number of codes.

In PHP, there are various types of loops – 

  • while
  • do while
  • for
  • foreach

Various types of Loops in PHP


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…


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…


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.


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 (:).…


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.


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


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.

In the demonstration, I show an input box for searching users and show the list of the result based on the input.

When the user selects 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


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


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