Clicks Counter Help
#1
Posted 04 January 2006 - 06:41 PM
The link listed was:
yoursite.com/urtoclickcounter/click.php?id=x (x= ur id in your database)
Let me get this straight. yoursite.com/urtoclickcounter/click.php? is the direct URL to the click.php, and the id=x (x being the URL to the actual link) is the link?
#2
Posted 04 January 2006 - 06:46 PM
#3
Posted 04 January 2006 - 11:13 PM
#4
Posted 05 January 2006 - 08:05 AM
ID | URL | CLICKS
1 | site1.com | 5000
2 | tutorials.com | 125123
3 | anothertutsite.com | 100
id 3 is the key to anothertutsite.com and 100 clicks. it adds one click so now there are 101 outgoing clicks, then it redirects you to anothertutsite.
Hope you understand it now
#5
Posted 05 January 2006 - 11:02 AM
?id=x
The id is there because of how the script is set up. The "X" means that that is the number of the site.
ex: ?id=1
That is link one every time you click ?id=1 it will increase the amount of clicks for that link.
?id=2
is your second link and every time you click it, it will increase the amount of click for that link.
The "1, 2, 3, 4 etc" after the ?id= just defines which part of the database to increase the amount of clicks.
Hope that helped you a bit more.
dEcade
#6
Posted 05 January 2006 - 12:32 PM
How would I echo that info up into text format?
#7
Posted 05 January 2006 - 01:31 PM
dEcade
#8
Posted 08 January 2006 - 05:58 PM
Additionally, what does this error mean: "Fatal error: Call to undefined function: is_numerical() in /home/g9core/public_html/count.php on line 16"
Edited by G.9, 08 January 2006 - 07:05 PM.
#9
Posted 08 January 2006 - 08:46 PM
It means you had a fatal error, you called a function that doesn't exist. The file it was called from is "/home/g9core/public_html/count.php", on line 16.
The function you want to use is is_numeric().
Edited by rc69, 08 January 2006 - 08:46 PM.
#11
Posted 09 January 2006 - 09:48 AM
#12
Posted 09 January 2006 - 09:22 PM
Quote
Change the table name and try again.
#13
Posted 13 January 2006 - 02:16 AM
The tutorial maker should be stoned to death.
[/UselessPost]
#14
Posted 13 January 2006 - 10:05 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?php
$result = mysql_query("SELECT id,url,count FROM counter_table WHERE id='$id'");
$row = mysql_fetch_array($result);
$id=$row['id'];
$count=$row['count'];
$count = $count;
$update = "UPDATE counter_table SET count='$count' WHERE id='$id' ";
$updatesql = mysql_query($update);
$sql = mysql_query("SELECT id,url FROM counter_table WHERE id='$id'");
$row = mysql_fetch_array($sql);
$id = $row['id'];
$url = $row['url'];
header("Location: $url");
mysql_close();
?>
</body>
</html>
I also found this, I believe this is just a display file:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?
mysql_connect("localhost","g9core_click","arvyandson") or die(mysql_error());
mysql_select_db("g9core_click");
echo "<h3>Affiliates</h3>";
$result = mysql_query("SELECT * FROM affiliates ORDER BY id") or die(mysql_error());
echo "<table><tr>";
while($row = mysql_fetch_array($result)){
echo "<td>";
echo "<a href=\"count.php?id=" . $row['id'] . "\" target=\"_blank\">" . $row['affname'] . "</a><br>";
echo "Clicks: " . $row['clicks'];
echo "</td>";
}
echo "</tr></table>";
?>
</body>
</html>
Which do I use, and what's wrong with each?
Edited by rc69, 13 January 2006 - 04:18 PM.
#15
Posted 13 January 2006 - 04:20 PM
And i would probably use the top code since it uses the correct table, but the only way to really know if anything is wrong is to upload them to your server and try them out.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
