Jump to content

Archived

This topic is now archived and is closed to further replies.

Noctagon

button incriment

Recommended Posts

I am not sure how way off I am here, but here goes :)

I have a button in a form and when I click it I want the value of the variable $count to increase by 1.

Any assistance would be greatly appreciated.

Thanks :)

[code]<input type="button" name="$but1" value="1">

..........................................................

if (isset($but1)) $count = $count + 1;[/code]

Share this post


Link to post
Share on other sites
You'll probably want to use a flat file database. There are plenty of  "Counter tutorials/scripts" out there.

Heres one [url=http://www.spoono.com/php/tutorials/tutorial.php?id=4]here[/url]

Share this post


Link to post
Share on other sites
Hi all,

I think I need to explain a little more  :)

I am TRYING to build a site where users can login......getting that bit done :)

Once a user is logged in there will be a page that has a button on it.....when the button is clicked a little counter next to the button will increment by 1 for each click in real time.....this will be user specific.....so 10 users could be logged onto the site and each clicking there own button and being displayed only their clicks

I will then be using the clicks value with PHP.

Any assistance would be greatly appreciated as other suggestions have appeared to me to be not able to cope with users.

Thank you :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.