Archive for June, 2008

Removing undeline from links

Tuesday, June 24th, 2008

Whenever we create a href then an underline comes by default for the link. We can remove this underline from the anchored text link by adding inline style to the a tag. Example is given below <a href="contact.php">Contact us</a> <!-- this produce the link with underline --> <a href="contact.php" style="text-decoration:none;">Contact us</a>  <!-- ...

Different types of CSS styles

Tuesday, June 24th, 2008

CSS gives flexibility in using different style property locally by overriding the global declared styles in external style sheet. Following are the 3 different types of styles. Inline or embedded style sheet Internal style sheet External style sheet Inline or embedded style sheet These styles can be added directly within HTML tags. This gets highest ...

Script to access MySQL database using PHP

Sunday, June 22nd, 2008

PHP and MySQL are most popular combination in creating web application. PHP and MySQL gets integrated easily in any platforms. Scripts developed in PHP using Window platform works perfectly in when used in Linux environment. Below example shows how to connect between PHP and MySQL database. <?php // Connecting to database $link = ...

What is PHP?

Sunday, June 22nd, 2008

PHP is a server side scripting language, widely used in web programming to build web applications. PHP can be used to develop dynamic content pages. Using PHP we can send request and get response or interact with database servers and manage the page content accordingly. How PHP works To run the PHP ...

Different methods for passing values from one page to another page

Saturday, June 21st, 2008

We often have to pass values of variables between pages in our web site. These are required in many different types. Some time we gather few values from database and want to retain the value throughout the site for some user as the user moves between pages. There are different ...

Disable browser back button using javascript

Sunday, June 8th, 2008

Some times after filling the form, user oftenly clicks on back button to go back. We can disable this back button using javascript in the following way <script language="JavaScript"> <!-- history.go(+1); // --> </script> <script> javascript:window.history.forward(1); </script> This script sends the user to the same page where he/she is clicking the back button. In another way its just disables ...

Display total rows count with LIMIT clause in MySQL

Sunday, June 8th, 2008

Assume there are lots of records in result set and want to display only few records. This concept is known as the pagination. The sql query to achieve above is, as follows, select * from books where bookcost > 3oo order by bookcost limit 0, 25; The above query will check the condition ...