Archive for March, 2013

How to delete DIV dynamically using JQuery

To download the code – Click Here

To delete or modify HTML contents we need to use JQuery or any other similar scripting methods.

In this example there are 3 DIV's and it can be deleted dynamically. When we click on the [ X ] button the corresponding DIV was deleted and also it send a POST request to delete.php so we can also delete the corresponding user from the database.

Live Demo


 

Read more »

How to find IP Address Location

To download source code – Click Here

In this example IP Address details are fetch from the website http://www.ip2location.com/. To view live demo click Show Location button in the below example

To download source code – Click Here

Read more »

Difference between mysql_fetch_row(), mysql_fetch_array() and mysql_fetch_object() in php

 
The functions mysql_fetch_row(), mysql_fetch_array() and mysql_fetch_object() return one row from the result, and then move the pointer on. If there are no more rows to fetch, it returns false. This means you can you use a very simple while loop:
 
$result=mysql_query("SELECT * FROM sometable");
while($row=mysql_fetch_row($result)){
do_something_with_row();
}
 
This will automatically terminate when the last row has been processed.
 
mysql_fetch_row()
—————————-
It returns the results in a numeric array ($row[0], $row[1] etc).


 
mysql_fetch_array()
——————————
It returns a the results an array containing both numeric array ($row[0], $row[1] etc) and associative keys ($row[“name”], $row[“email”] etc).


Read more »

Last updated by at .