Quote:
Originally Posted by ThePokerBank
I'm interested in this also. Do I have to go into my cpanel to sort this out?
Can anyone give a quick guide?
|
This is easy for someone who knows mysql and php. But the following
tutorial is no use if you dont know anything about them. From an
experienced coder it would take about 5-30 minutes to setup
depending on the complexity of the page that prints the results.
What you need to do is:
1. create a new table to your mysql database with this query:
CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
count INT)
2. add this code to your php redirect page:
mysql_connect("servername","username","password");
mysql_select_db("yourdatabasename");
mysql_query("UPDATE example SET count=(count + 1) WHERE id='0'");
mysql_close();
3. to see how many clicks you had, you would create a page that
fetches the count and prints it out. This one could be the
"admin" page and require login, which would need some more code