click per session

Discussion in 'General PHP' started by skyhigh, Aug 21, 2018.

  1. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    446
    Likes Received:
    8
    hi how do i make this to click per session just like the per session code in the item.php page

    i have this code below i dont want it to keep increasing when it get click i want it to only increase per session

    PHP:
    if (isset($_POST['action']) && $_POST['action'] == 'update')
      {
       
         
    $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);   
               
         
    header('location: item.php?id=' $id);
         exit();

       }
    thanks
     

Share This Page