hi all need ur help with some thing,
and ajax and php update
i kinda need a click counter so i know when someone click play
per session user i have a download script which has a session user rule below
//update download button click
if (isset($_POST['action']) && $_POST['action'] == 'update')
{
if (!isset($_SESSION['downloaded_item_'.$id])) {
$query = "UPDATE " . $DBPrefix . "auccounter set download_counter = download_counter + 1 WHERE auction_id = :auction_id";
$params = array();
$params[] = array(':auction_id', $id, 'int');
$params[] = array(':download_counter', $id, 'int');
$db->query($query, $params);
}
$_SESSION['downloaded_item_'.$id] = true;
header('location: track_audio.php?id=' . $id);
exit();
}
column name for click counter is play_counter
html code is
<div class="sm2-inline-element sm2-button-element">
<div class="sm2-button-bd">
<a href="#play" class="sm2-inline-button sm2-icon-play-pause">Play / pause</a> </div>
</div>
i dont know how to go about this thats y am asking here
i know its gonna be javascript and ajax n php, ur help is greatly needed thanks