Jump to content


Photo

button incriment


  • Please log in to reply
4 replies to this topic

#1 Noctagon

Noctagon
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 26 September 2006 - 02:57 AM

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 :)

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

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

if (isset($but1)) $count = $count + 1;



#2 SieRobin

SieRobin
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts
  • LocationNew Jersey

Posted 26 September 2006 - 04:50 AM

Don't think this can be done without a database.

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 26 September 2006 - 10:10 AM

You'll probably want to use a flat file database. There are plenty of  "Counter tutorials/scripts" out there.

Heres one here

#4 Noctagon

Noctagon
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 06 November 2006 - 04:15 AM

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 :)

#5 Noctagon

Noctagon
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 09 November 2006 - 01:01 AM

bump :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users