What I am looking to do, is make an image clickable, and when the image is clicked it increases a counter. Pretty much I want to know how many times the button has been clicked. It would be great if this was all done real time as well. If anyone has any ideas I would greatly appreciate that.
Your best bet is to set up a simple Ajax interface, which does the client->server transmission of information, where you can be informed of the click events and then record them in your database as needed.
That is almost exactly what I need. The intention is to keep how many times the button is clicked from everyone, so the variable would need to be global. and increase for every person that is on the page.
Not sure if there is something I should do to keep this server side.
hEY. i FOUND YOUR CODE VERY USEFUL. I WAS WONDERING IF THERE WAS ANYWAY THE COUNTER CAN BE EDITED SO THAT IT IS ON THE SIDE OF THE BUTTON AND CLOSE TOO
AS OPPOSED TO BEING ON THE BOTTOM AND WAY DOWN?
YOU ARE AWESOME
I am a knitter, and an android user. I need, and haven't been able to find, an app that I can use on my tablet and phone and be shown the same data from the last update on whatever device.
My ultimate goal would be to have a page where I can add/delete/select projects and then go to the associated counter.
I haven't practiced what JS/PHP I learned a few years back so trying to jump back in is just a little difficult. At the moment I have some goofy looking html/css but I'm not sure how to implement my functions from my external file. When the "+" button is clicked I'd like to see the Row/repeat number increase by 1 and subtract 1 for everytime the "-" button is clicked. However, what I have right now doesn't update when the buttons are clicked. For the time being I'm playing with the Row counter so that I can implement the same code for the repeat counter. Please pardon the design bugs for now, I'm looking for getting my functionality going and would like to just see it work already! I uploaded my code here for those that would like to see what I have: http://thedevplace.info/counter/counter.php
Once I do get it working, I could also use some advice on what to do next in terms of making this work across several devices. I assume I'd have to generate and query a database but getting data in/out etc would be another issue I'll have to cross.