Cool Ajax - Web Development Tutorial Blog

Category : How To

Codeigniter tips how to make url seo friendly

Hello everyone, welcome to my today’s post on “How to make URL SEO friendly in CodeIgniter”. I’ve a good news for you that from today I’m going to start a new tutorial session on codeigniter. I’ll post useful and effective tips on CodeIgniter regularly that will help you to built an efficient CodeIgniter(CI) application. So, First of all lets learn [...]


How to check codeigniter version

Today in tips and tricks section, we are going to learn about how to check CodeIgniter version. CodeIgniter is one of the most popular PHP framework in current time. Lots of CodeIgniter version has been introduced in last couple of years. In each new version, they improved libraries, plugins, helpers code. If you are working as a freelance web developer [...]


How to Generate Random String in JavaScript

Generating random string in JavaScript is extremely simple. Last day, I worked on my freelance project and I need to create a long random string using JavaScript. As I said before, it’s simple but bit tricky. I thought I can share that snippets, so that you can use that code in your project too. So let’s get started – – [...]


How to remove character from a string?

Removing characters from a string is most common and frequent activities in PHP. Suppose, You have a long name, but your system does not allow to show more than 6 characters of your name. In this case, you need to keep only first 6 characters from your name. To solve this issue we use substr() function. – Solution to remove [...]


How to get header footer and sidebar in wordpress

Hello friends, today I’m going to share 3 basic WordPress function about how to load header, footer and sidebar in your WordPress theme. Each WordPress theme contain 3 common files for header(header.php), footer(footer.php) and sidebar(sidebar.php). To load that files WordPress have 3 dedicated functions. Here they go- – Load header: Header section contains basic elements like logo, top menu, main [...]


How to use loop in wordpress

Today we are going to learn how to use loop in WordPress. Well, “loop” is a very common term in WordPress. Because we need to use this “loop” for load posts and comments. Here goes a loop structure in WordPress. Have a  look-   if(have_posts(): while(have_posts()): the_post(); echo "Your post contain goes in here"; endwhile; else: echo "You have no post [...]


How to check empty string values in PHP?

As a PHP programmer most of the time you have to deal with form submission. In a form submission page, user may be submit a form without filling all required fields like user name, valid user email address or passwords. In that situation your system must show a notification message that, “user name field” is required. In another case, sometimes [...]


How to redirect mobile devices using htaccess

It’s a very simple tricks to redirect visitors in your mobile supported website. This simple htaccess snippet can detect browser agent and redirect it to your mobile website if they come from any mobile/table device. Have a fun with this script. Enjoy!   RewriteEngine On RewriteCond %{REQUEST_URI} !^/m/.*$ RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR] [...]


How to active CURL in localhost

Most of the them we faced issue with curl function while we working in localhost. Basically, when we install local server in our machine then CURL function set as inactive. That’s why it show an error message because local server can’t initiate curl function. But we can active curl in localhost very easily. Follow the steps. Step: 01 Go to [...]


How to get user timezone using javascript

How to get user timezone using javascript: Time zone setup is very useful, while you are working in a project for different countries. Last day worked such a project and had faced big issue on how to get user timezone using JavaScript. It’s very simple and easy to find out user time zone and manipulate your data according to time [...]