simpele-hits-teller-met-database
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?
/*
CREATE TABLE 'teller' (
'teller' TEXT NOT NULL
);
*/
mysql_connect("host","gebruikersnaam","wachtwoord");
mysql_select_db("database_naam");
$sql = "UPDATE teller SET teller = teller+1";
$sql = mysql_query($sql) or die (mysql_error());
$sql2 = "SELECT * FROM teller";
$sql2 = mysql_query($sql2) or die (mysql_error());
while($query = mysql_fetch_object($sql2)) {
echo "Deze site heeft al <b>$query->teller</b> hits!";
}
?>
/*
CREATE TABLE 'teller' (
'teller' TEXT NOT NULL
);
*/
mysql_connect("host","gebruikersnaam","wachtwoord");
mysql_select_db("database_naam");
$sql = "UPDATE teller SET teller = teller+1";
$sql = mysql_query($sql) or die (mysql_error());
$sql2 = "SELECT * FROM teller";
$sql2 = mysql_query($sql2) or die (mysql_error());
while($query = mysql_fetch_object($sql2)) {
echo "Deze site heeft al <b>$query->teller</b> hits!";
}
?>