Noctagon Posted September 26, 2006 Share Posted September 26, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/22061-button-incriment/ Share on other sites More sharing options...
SieRobin Posted September 26, 2006 Share Posted September 26, 2006 Don't think this can be done without a database. Quote Link to comment https://forums.phpfreaks.com/topic/22061-button-incriment/#findComment-98727 Share on other sites More sharing options...
wildteen88 Posted September 26, 2006 Share Posted September 26, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/22061-button-incriment/#findComment-98814 Share on other sites More sharing options...
Noctagon Posted November 6, 2006 Author Share Posted November 6, 2006 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 clicksI 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 :) Quote Link to comment https://forums.phpfreaks.com/topic/22061-button-incriment/#findComment-120159 Share on other sites More sharing options...
Noctagon Posted November 9, 2006 Author Share Posted November 9, 2006 bump :) Quote Link to comment https://forums.phpfreaks.com/topic/22061-button-incriment/#findComment-121882 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.