Jump to content


Photo

counting clicks on submit button


  • Please log in to reply
4 replies to this topic

#1 digi duck

digi duck
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 04 September 2006 - 09:44 AM

--------------------------------------------------------------------------------

Hi i was wondering if any1 knew of a way how to count clicks of a submit button and show thi number on a different page without using a database.
This is my site http://gamesigs.co.uk and what i would like is for evertime someone clicks on the submit button on gamesigs.co.uk/create.php for it to add one on to the count and show this count on the index.php page. Any ideas would be appreciated. Also i don't think i can put any more code in the _sig_create.php (the file the button geos to) as it messes up the page.
Thanks a lot Digi.

#2 digi duck

digi duck
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 08 November 2006 - 06:06 PM

bump

#3 Renlok

Renlok
  • Members
  • PipPipPip
  • Advanced Member
  • 258 posts
  • Locationnewbury

Posted 16 November 2006 - 01:25 AM

use a text file to store the count and have the counter on the page/code the button takes you to.

#4 digi duck

digi duck
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 02 January 2007 - 11:06 AM

how would i do this?

#5 Renlok

Renlok
  • Members
  • PipPipPip
  • Advanced Member
  • 258 posts
  • Locationnewbury

Posted 02 January 2007 - 12:31 PM

use the fopen command to open, something like this:
<?php
$handle = fopen("yourfile.txt", "w");
?>

then youll need to use the fwrite command cant remember how to use this so read up on it at http://uk2.php.net/m...tion.fwrite.php




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users