Create a DIY three-step counter (on ). Most people are eager to use databases for counters, message books, forums, and other things. This article will introduce self-made counter programs. First, create 0 ~ 9 Most of these 10 GIF figures are eager to use databases for their counters, message books, forums, and other things. This article will introduce my own counter programs.
First, create 0 ~ 9 place the 10 GIF digital images in the img folder and create a php file.
-- Count1.php:
$ Linkptr = mysql_pconnect ("localhost", "yourname", "password ");
Mysql_select_db ("yourname", $ linkptr );
Mysql_query ("update counter
Set visited = visited + 1 where num = 1 ", $ linkptr );
$ Result = mysql_query ("select visited
From counter where num = 1 ", $ linkptr );
List ($ counter) = mysql_fetch_row ($ result );
$ Counter = sprintf ("% 05d", $ counter );
For ($ I = 0; $ I <5; $ I ++ ){
$ Tmpstr = "";
Echo $ tmpstr;
}
?>
Place code on the home page as appropriate In this way, your counter is displayed on the homepage, but remember to create a TABLE -- counter: create table counter (
Num int unsigned,
Visited int unsigned
);
How is it easy! In this article, I will introduce how to make your image site use your own counters.
Bytes. First, create 0 ~ 9. These 10 GIF numbers...