Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6986677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:50:24+00:00 2026-05-27T18:50:24+00:00

How can i record clicks on pictures into mysql database? It is possible with

  • 0

How can i record clicks on pictures into mysql database?
It is possible with function onComplete or Ajax ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:50:24+00:00Added an answer on May 27, 2026 at 6:50 pm

    You can add a callback for one of the many callback events Fancybox 2 exposes. In this example I’ll use afterLoad (if you are using Fancybox 1.X then onComplete would be a good event to bind to):

    $('.my-links').fancybox({
        afterLoad : function () {
            $.get('path/to/server-side-script.php', { id : this.orig[0].id }, function (response) {
                //you can now access the server response via the `response` variable
            });
        }
    });
    

    Note: The above code snippet assumes that each image has it’s own ID, otherwise this.orig[0].id needs to be changed to something unique about each image.

    Your PHP script would look something like this:

    <?php
    if (isset($_GET['id'])) {
    
        //connect to DB here
    
        $query = mysql_query("INSERT INTO tracking_table (image_id) VALUES (" . mysql_real_escape_string($_GET['id']) . ")", $db) or trigger_error(mysql_error());
    }
    ?>
    

    This is of-course expecting you to write your server-side code in PHP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get a record id after saving it into database. Which I
I would like to know how I can record a video in MATLAB with
I am searching for a web service which can record the actions done by
the new keyboard from Microsoft, Sidewinder x6 can record in game macro. I was
I want to know how we can get record count using reference cursor in
I have parent/child relationship set up via Node Reference. A Child record can have
how can i preview / record or only preview video from my tv tuner
So i need to figure out how i can get a record count value
I would like to create a list of records. I can add one record
How can you go about updating a record without having to select the data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.