Keeping Stats on Button Clicked

Discussion in 'Programming' started by CWN, Jul 23, 2006.

  1. #1
    Hi,

    Let's say I have a button:

    <input type="submit" name="browse" value="Browse Website Safely" onclick="return submit_form();" />
    Code (markup):
    I would like to keep record of how many times this button has been clicked. How can I do this? Thank you
     
    CWN, Jul 23, 2006 IP
  2. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From the code, I understand that it is part of the PHProxy script, right? There are many ways you can achieve this. One way would be to use AJAX to call a PHP file that would update this count stored in a text file. Or you can ad the code at the place in the code where the form is being processed.I am not sure about this:
    It can be here:
    
    if (isset($_GET[$PHProxy->config['get_form_name']]))
    {
    
    PHP:
    or here:
    
    if (isset($_GET[$PHProxy->config['url_var_name']]))
    {
        $PHProxy->start_transfer($_GET[$PHProxy->config['url_var_name']]);
        echo $PHProxy->return_response();
        exit();
    }
    
    PHP:
    The problem is that the script is has one big mess of PHP, HTML and Javavscript. :shock:

    Thomas
     
    coderlinks, Jul 23, 2006 IP