If you don't have phpmyadmin, create a .sql file, with this sql:
CREATE TABLE `totalhits` (
`hits` BIGINT( 20 ) NOT NULL
);
Ok, now that we've got the SQL portion done, let's move on to the PHP coding!
First off, make a new file (in your cpanel's file manager, under the public folder) named db.php. In that file, include this (you need to alter the coding based on your personal info of your php username and password):
$dbh=mysql_connect ("Your Host (most often "localhost")", "Your PHP username", "Your PHP password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database here");
Save the db.php file. Now, open the file that you want a hit to be added each time you visit, and add this php coding:
| » Level Basic |
|
Added: 2004-09-08 Rating: 8 Votes: 8 |
| » Author |
| Good Luck! If you need help AIM me at Anthony Kid x |
| » Download |
| Download the files used in this tutorial. |
| Download (0 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!