Senin, 31 Agustus 2009

PHP for converting numbers into words (upto one lakh)

Here is a way to convert numbers to words (upto one lakh). It can be extended as per your requirement as well. This is useful for billing etc. Note that only one parameter should be input, and not both. The second parameter is used only for some internal recursive calling.

Minggu, 30 Agustus 2009

Simple css 1 level Vertical navigation menu

Hi,
Today i will be showing you how to create a simple 1 level vertical navigation menu with the help of css.
It is very easy and same like the 1 level horizontal navigation menu.


So lets start,


For this we will be using one image





first we will create a simple code to display "unordered list" with ul and li 










So now our display of the ul will be like this







Now we will apply our css to this ul







After applying this css our menu will look like this







Full code of the vertical menu with css is as, just copy and paste it, and modify links and its over.







Sabtu, 29 Agustus 2009

New version 6.0.2 of PHP DataGrid

The new version 6.0.2 of PHP DataGrid is available for downloading from here. The new version 6.0.2 of PHP DataGrid is available now for downloading. There are many bugs fixed and also some new additions and improvements. This version requires full re-installation, if you work with one of previous. Read carefully Getting Started. Here the main additions and improvements:• Feature: [added] added

Jumat, 28 Agustus 2009

Simple css 1 level horizontal menu

Hi friends,
here is a simple example of 1 level horizontal navigation menu.
for this i am using 2 images - one is orange and another is blue

you can copy these images from here 


For creating a "1 level horizontal navigation menu" we are going to use "unordered list"




Now this will create an unordered list.





Now we will apply a CSS to this unordered list to make it a horizontal navigation menu.




Hey ! Its ready ! See it !





Completed ready use script and code is here

Kamis, 27 Agustus 2009

Create a login box with css, html

We always require some kind of login box for any system which has members.
Here i will be showing a simple example with the help of CSS and HTML to create a attractive login box.

To begin with We will create a login box first and then apply the CSS to it

Replace "youfilename.php" with your script which has the logic to check the login.





When you will add this code to your login file then display will be like this - fully stretched on the page with a simple look.

Now we will add a css to this login box to make it look nice.





Now after applying this css see at our login box.



Now combining all together we have created a very simple nice looking login box without using any other images.
Full source code is given below. Just copy and paste it in your project, if necessary just modify the css.




free php scripts and free php codes

Hi,
Here you will find lots of useful and ready to use free php scripts and codes in php, css, ajax, javascript and many more.....
keep visiting this blog.

Rabu, 26 Agustus 2009

Create a database connection file in php mysql

Whenever you are working on a project you might need to create a database connection and select a database.
Here i am going to show you a simple way to create your connection file "connect.php"
First create a file and save it as "connect.php"






Now save this file.
Now just include this file on top of your any other php script.
No need to write code each time.
ex. create a new file called "data.php" and include "connect.php" in that file on top as



Have nice time.

How to get ip in php ?

How to get IP in php ?

Senin, 24 Agustus 2009

Fill select tag with php - fill select tag of form with php

While working on a project you might need a dynamic select box to be generated from the values present in the database.

So this example gives you a simple way to populate a select box with the values present in the database.



Consider a example - there is a table "article" in your database "mydb"



So for this first we need to create a connection with the database and we need to select the database.



For this we will create a file called "connect.php"



replace the values with your actual values as per directed in code







After that we will write our main code in a file called "myselect.php"







And its over. Its very simple.

Try it out, if you face any problem then comment here, i will help you.

Rabu, 19 Agustus 2009

Show A-Z links for Pagination

Show a-z links on a page for pagination




You can replace $PHP_SELF with the filename for which you want to generate this pagination.
Ofcourse this code doesnt shows the logic to display actually pagination, but instead of taking characters from a-z in a array this is the simple way to show a-z characters for processing.

Soon even i will publish the code to do actual pagination.

Sabtu, 15 Agustus 2009

New version 6.0.1 of PHP DataGrid

The new version 6.0.1 of PHP DataGrid is available for downloading from here. This is a new generation of DataGrid. There are also some changes in this version. Read carefully Getting Started. This version requires full re-installation, if you work with one of previous versions. Here the main additions and improvements:• Feature: [added] new displaying type "label" for foreign keys• Feature: [

Rabu, 05 Agustus 2009

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

[Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in]

Hi,
when you are doing programming in php you might be getting a error like

[Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in] 

this in your php script.

Most of the times if there is mistake in spelling then many errors occurs.

Just check out following things if you encounter this kind of Warning in your php program

  1. First check your query.
  2. If you are using different connection file for creating connection then check whether it is included in your script or not.
  3. If query is correct then check your Database Connection.