Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
// connecting to database MySQL
$connessione = mysql_connect("host","user","pass");
//choose db
mysql_select_db("db_name",$connessione);
$id = (int)$_GET['id'];
//echo $id.'<br>';
$new_hits = 0;
// get number of hits from db
$result = mysql_query("SELECT hits FROM plogger_pictures WHERE id=$id" );
if ( mysql_num_rows($result) )
{
$row = mysql_fetch_array($result);
$old_hits = $row['hits'];
//update hits
$new_hits = $old_hits + 1;
mysql_query("UPDATE plogger_count SET hits=$new_hits WHERE id=$id");
}
//close connection
mysql_close($connessione);
if( !isset($_SESSION["$id"]) ) //increase the hits
<?php
$hit_id = plogger_get_picture_id();
if (!isset($_SESSION['hit_id'][$hit_id])) {
$new_hits = 1;
$result = run_query("SELECT `hits` FROM `plogger_pictures` WHERE `id`=$hit_id");
if ( mysql_num_rows($result) ) {
$row = mysql_fetch_array($result);
$old_hits = $row['hits'];
//update hits
$new_hits = $old_hits + 1;
}
run_query("UPDATE `plogger_count` SET `hits`=$new_hits WHERE `id`=$hit_id");
$_SESSION['hit_id'][$hit_id] = true;
}
?>
$_SESSION["$id"]
and it work using $_SESSION['hit_id'][$hit_id]
1 to 9 of 9