Monthly Archives: August 2011

MySQL – Resolved null issue in query.

We have faced strange issue with MySql old version (version 4). Our php file will pass a querystring variable “id”. It can have a value or it can be empty in some situation. Initially, we used below code, $id=$_GET[‘id’]; $sql=”select

Posted in MySQL Tagged with: ,

Dynamically changing/displaying web page content using javascript without refreshing the page

Sometimes we may need to change the content displayed in the webpage frequently. Javascript will enable achieving this without the need for refreshing the webpage.(i-e without requesting the page again). Below steps are needed for doing this. – All the

Posted in Javascript, jQuery Tagged with: ,

For using javascript Calendar in web page

1. To use calendar in our page, we should include one JS file in our project on the same path of our page. 2. Paste the following line in <head> <SCRIPT LANGUAGE=”JavaScript” SRC=”CalendarPopup.js”></SCRIPT> <SCRIPT LANGUAGE=”JavaScript” ID=”js1″> var cal1 = new

Posted in Javascript Tagged with: ,

Detecting browser type using javascript

Many different browsers (e.g FireFox, IE,chrome,opera,safari)are available for displaying webpages. Each and every browser will have their own way of rendering content of webpage, and script (e.g javascript) execution also will vary based on the script engine implemented with them.

Posted in Javascript

Javascript validation for radio button in HTML form

HTML is having INPUT tag withradio as type to display radio button in the HTML form. Multiple input tags should be given same name to make it one group. Consider below code which will allow the user to select any one

Posted in Javascript Tagged with: ,

Handling Date and Time in PHP/MySQL

Date and time can be inserted into mysql table in specific format only. But php will support different types of date and time formats. So, we should convert the date and time from php into specific format before inserting the

Posted in MySQL, Php Tagged with: ,

Avoiding multiple lines in tag

In some situation (viewing in different browsers) the single <td> tag displays content in two lines. If you want to display sentence in single line always in all browsers then use <td> attributes ‘nowrap’ For example,you may want username/userid/Name to be

Posted in General Tagged with: ,

Steps for PHP installation

We can follow below steps for installing php with Apache server. Install Apache-2 while (installing it give domain name and server name as localhost) Create a folder inside Apache with name=”php”. Unzip the file “” inside the folder “php”. Rename the file “php.ini-recommanded”

Posted in Php Tagged with: ,

Google Analytics

Google Analytics is a free feature provided by Google. It will give statistics of the webpage in nice way. – We can see even how much time the visitor spent on particular page. – We can get details about browser/net

Posted in General

Focusing HTML element immediately after loading the web page

Focusing (i-e putting cursor) appropriate control/HTML element in a webpage will enhance the user experience. It should be done once after loading the page. We can use the below javascript code for doing this ononload event of window. This code should

Posted in General, Html