Web Development

How to detect an AJAX request in PHP

You can use below code block in your PHP scripts to check if an incoming HTTP request is made with AJAX or not. This can be useful in situations where you want to make sure your script only respond to asynchronous requests. It is important to note that HTTP_X_REQUESTED_WITH header is not enabled in all… read more »

How to check if Curl is available on your PHP Server?

First you can try phpinfo() function as shown in the below example. Create a file called phpinfo.php and add below code: When you save and run this script, the phpinfo() function will dump all the configuration information of your PHP installation. Scroll down until you see the word ‘Curl’ or hit Ctrl + F to… read more »

Installing Composer

Windows If you are on windows, the easiest way to install composer is by grabbing a copy of windows installer provided by the official composer website. The instruction are outlined below. Make sure you already have PHP installed in your system. It comes bundled with XAMPP, WAMP or otherwise you can install independently by downloading… read more »

How to perform form validations in Codeigniter

First you have to load the validation library in your controller’s constructor or in the method you are trying to perform validations. I recommend you to load it in the constructor so it will be available to all controller methods: Once the validation library is loaded, you can set the validation rules with below statement… read more »

How to Show/Hide Html Elements with jQuery

In this post I am going to show you how to show or hide elements of a web page by using jQuery. Create a new html file with your text editor and put below contents into it: Now suppose we want to hide the text ‘Hello World!’ when we click ‘Hide Title’ link. Lets see… read more »

How to include jQuery in your HTML Page

jQuery is a popular Javascript library which makes it easier for you to manipulate elements of your HTML page once it is loaded into the browser. To use jQuery first we have to include it in our HTML pages. You have couple of options when it comes to including jQuery in your HTML pages: You… read more »


Do NOT follow this link or you will be banned from the site!