PHP - Creating a counter for the site
Requirements:
- Servers with Apache installed;
- PostgreSQL Server (SQL Server) installed;
Recommended PHP knowledge:
- Session variables;
- The instruction includes;
- Knowledge of SQL;
This tutorial was tested under a Linux server with PHP 4 and PostgreSQL server with SQL, but there is nothing to try it under Windows, and if you want to use the SQL Server MySQL just replace the functions of PHP for the PostgreSQL with those of MySQL (for the reference manual on www.php.net Vai).
If you want to have an interface for Linux to edit your database, you must go to http://www.greatbridge.org/project/phppgadmin/projdisplay.php.
In this tutorial I will explain how to create a counter for their website.
You must create a database in PostgreSQL with counter name contains only one field, called hits, numeric type (int8), belonging to the table count.
Then you need to create a function called IncrementaContatore, which is passed three parameters, the username and password to interface to PostgreSQL and the database name to use.
The following is added to the code to enter if we wanted to have a counter in our pages:











Recent Comments