Blog

3 minutes read
.htaccess file or configuration file provide a way to make configuration changes on a per-directory basis. A file that containing one or more configuration directives, is placed in a particular document directory. How to Create a .htaccess File? Open any text editor application or notepad and file save as with .htaccess name. Enable mod_rewrite extension in php.ini file in Apache Web Server configurations if disabled. RewriteEngine On it is turn on Rewrite Rules in Apache Server. ...
a minute read
HTML5 is the latest and enhanced version of HTML. HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web.   HTML5 provides some new elements and attributes that helps in building a modern websites. Following are features provided in HTML5. Semantic Elements: These are like <header>, <footer>, <section> and <article>. Local Storage and Session Storage: As HTML5 Web Storage stores the data on Object ba...
5 minutes read
Calculate sum of html element’s values with specific class names using Jquery. This code is useful in get sum of the elements values of specific class ,id. Jquery Something like the following should work for you: How to get sum of html element's values with specific class names <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(fun...
a minute read
we can execute a query that will list all tables in a specific database along with the disk space (size) of each. We can list all the tables along with each table size (disk space) by using a query. SELECT table_name AS Table, ROUND(((data_length + index_length) / 1024 / 1024), 2) Size (MB) FROM information_schema.TABLES WHERE table_schema = “$Database_Name”; Query to get list the size of every table in every database, with of the order of size: SELECT table_schema as Da...
2 minutes read
What is PHP ? PHP stands for Hypertext Preprocessor and is a server-side language. PHP allows web developers to create dynamic content that interacts with databases. PHP is relatively new (compared to languages such as Perl (CGI) and Java) but is quickly becomming one of the most popular scripting languages on the internet. Learn PHP Code PHP is basically used for developing web based software applications. Writing PHP code on your computer is very easy. Declaring PHP Code PHP scripts are always...
3 minutes read
Get a list of user who are inside the circle or square of a given latitude and longitude with given distance or radius. For example my input Lat= 75.1545 and Long = 64.7643 and distance = 10 miles. I would like to get the list of users who are inside 10 miles distance from the point 75.1545 and 64.7643. Now its possible to solve this by single Mysql query. So we need  a user  table with user name, latitude and longitude of the users address. The Mysql query that will find the closest 50 l...
4 minutes read
FPDF is a class to create PDF files with PHP, that is to say without using the PDFlib library. For those who are already familiar with FPDF, this post will show you how to output your PDF file using FPDF. There are 4 methods that you can use according to your own needs: Method 1: Saving the PDF to a file: $pdf->Output('yourfilename.pdf','F'); 1 $pdf->Output('yourfilename.pdf','F'); ...
3 minutes read
How to get second highest or nth maximum salary of an Employee table is one of the most frequently asked Mysql/SQL interview question. PHP Mysql Query Suppose we have the following simple database table called Employee that has 3 columns named Employee ID,Employee Name and Salary:  Employee ########################################## Employee_ID —– Employee_Name ——- Salary 1: —————– Avanish——— ——- 1000 2: —————– Abhishek——- ——- 1500 3:———...
20 minutes read
XML2Array is a class to convert XML file content to an associative array in PHP. It returns an array which can be used for data insertion into database. Its simply take string xml content as input and return array. Its very user when we are handling with xml files getting from SOAP and curl request. <?xml version="1.0" encoding="UTF-8"?> <Class> <Student> <Name>Ashish</title> <Sex>Male</Sex> <Age>...
a few seconds read
The HTML5  provides <video> element  that specifies a standard way to play  video in a web page.So we can play video without using any third party software like flash . HTML% Video Player   In this post we discuss about controls of the play video. We can use some controls like play / pause video,play video in big / small screen. <!DOCTYPE html> <html> <title>HTML 5 Video Player</title> <body> <div style="text-align:center&#...