Access MySQL from PHP

In this tutorial, we are going to access MySQL database from PHP. Accessing MySQL from PHP is very simple and easy to implement. PHP contains built-in functions to connect the MySQL database and to access the data. Those functions are,

  • mysqli_connect – To connect the database by using the specified configuration.
  • mysqli_query – To execute a query to get resource id.
  • mysqli_fetch_row – To read row data with the reference of the resource id. There are many MySQL fetch functions in PHP to read table rows.

I have added an example code for accessing MySQL database from PHP. I used the database table named animals on which the create, read, update and delete (CRUD) functionalities are going to be performed.

Access MySQL from PHP

Sage Pay Payment Gateway Integration using PHP

Sage Pay payment gateway integration is easier to implement in websites. Sage Pay provides API access for requesting payment process from our website. This type of payment integration can be done in three ways using Sage Pay checkout pages, Sage Pay drop-in checkout and using own form. People having experience in any kind of payment integration (PayPal) can find it easy to follow the API documentation for integrating Sage Pay. If you are a newbie for payment integration, this article will help you to start with a simple example for integrating Sage payment in the test environment.Sage Pay Payment

Phone Validator API

This post details the RESTful API method for integrating Phone Validator, which facilitates native access to calling phone lookups.


Ready to get started? Once you have signed up and created an account try out a quick url search or curl command to query the Phone Validator RESTful API:



jQuery AJAX Autocomplete – Country Example

Autocomplete feature is used to provide the auto suggestion for users while entering input. In this tutorial, we are going to suggest country names for the users based on the keyword they entered into the input field by using jQuery AJAX.

jQuery Autocomplete function is called on the key-up event of the input field. This function requests PHP for the list of countries via AJAX by sending the value of the input field. In PHP, it reads country names from the database that starts with the keyword entered by the user.



How to show and hide div elements based on the selection of radio buttons in jQuery

Use the jQuery show() and hide() methods

The following example will demonstrate you how to show and hide div elements based on the selection of radio buttons using the jQuery show() and hide() methods. The div boxes in the example are hidden by default using the CSS display property which value is set to none.

Show Hide DIV

How to Pass Data with Ajax to a PHP file

In today’s tutorial, I’m going to show you, how to Pass Data with Ajax to a PHP file and process it. Using this method, you can retrieve data from a database, and run other PHP scripts using the values of the forms and fields.



How do I show some particular div after scroll 100 px?

jquery_scroll _divYou can achieve this by using javascript’s pageYOffset property to show the div after 100px of scroll.
The pageXOffset and pageYOffset properties returns the pixels the current document has been scrolled from the upper left corner of the window, horizontally and vertically.
The pageXOffset and pageYOffset properties are equal to the scrollX and scrollY properties. These properties are read-only.
Let us see the code:


How to Get Started With Python?

In this tutorial, you will learn to install and run Python on your computer. Once we do that, we will also write our first Python program.

Python Install

Many PCs and Macs will have python already installed.

PayPal Standard Payment Gateway Integration in PHP

PayPal is an American international e-commerce business allowing payments and money transfers to be made through the Internet. PayPal is the most popular payment gateway to send and receive payment worldwide. PayPal is a widely used payment gateway to accept payment in the web application. PayPal payment gateway is the easiest option for the web developer to implement a payment system on the website.



Python JSON

In this tutorial youll learn how to read and write JSON-encoded data using Python.
Youll see hands-on examples of working with Pythons built-in json module all the way up
to encoding and decoding custom objects.

python json