Skip Navigation

[Resolved] button click counter

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 7 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#557699

Hi

I need to declare a variable --- lets call it X with a value of 1 and save it in the DB linked to 2 buttons

button 1

button 2

When the button 1 is clicked I want 1 to be added to X .... so the value of X becomes X + 1 = 2

When the button 2 is clicked I want 1 to be taken away from the value of X .... so the value of X becomes X - 1

This is to be used for voting purposes.

Any assistance is welcome.

#557781

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

I'm not sure how this relates to our products but non the less I'll try to provide some advice. Seems like you want to do some form of voting on your posts.

Your best option is some 3rd party plugin as we wouldn't not be able to assist with the custom coding that this requires.

https://wordpress.org/plugins/wti-like-post/

Please let me know if this helps.
Thanks,
Shane