[PHP] count link clicks

2002-08-13 Thread victor
How do I count how many times a user clicks on a certain link? (and put it into and array or variable I guess). I want to be able to repeat a certain action on the same page as many times as the user clicks on the link($PHP_SELF). Thanks, - Vic

Re: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
Write a link wrapper that you would use like this: a href=wrap.php/www.domain.com/path/file.html Then in wrap.php: ?php $link = substr($PATH_INFO,1); ... increment counter in database for $link ... header('Location: $link'); ? -Rasmus On Tue, 13 Aug 2002 [EMAIL PROTECTED]

RE: [PHP] count link clicks

2002-08-13 Thread vic
PROTECTED] Subject: Re: [PHP] count link clicks Write a link wrapper that you would use like this: a href=wrap.php/www.domain.com/path/file.html Then in wrap.php: ?php $link = substr($PATH_INFO,1); ... increment counter in database for $link ... header('Location: $link

RE: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
Really? That sounds more complicated than I think I need it to be, can't I use something like: 'a href='.$PHP_SELF.'?add_form='.$value.'' and somehow (this is what I need to know) get $value to increase in value as the user clicks on the link again and again... Nope, you would be fighting

RE: [PHP] count link clicks

2002-08-13 Thread vic
I have no database, this has to be done in PHP - Vic -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 3:05 PM To: vic Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks Really? That sounds more complicated

RE: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 3:05 PM To: vic Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks Really? That sounds more complicated than I think I need it to be, can't I use something like: 'a href='.$PHP_SELF.'?add_form='.$value

RE: [PHP] count link clicks

2002-08-13 Thread victor
I think I'm on the right track with: ?php $i = $value++; // Show first link echo 'a href='.$PHP_SELF.'?add_form='.$value.' New paragraph /a /font'; // Isert form html into $data_fields variable $data_fields = 'html html blah blah a

RE: [PHP] count link clicks

2002-08-13 Thread Mike Dunlop
-Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 2:49 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] count link clicks Write a link wrapper that you would use like this: a href=wrap.php/www.domain.com/path/file.html

RE: [PHP] count link clicks

2002-08-13 Thread Dave at Sinewaves.net
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 12:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks I think I'm on the right track with: ?php // // CHANGE

RE: [PHP] count link clicks

2002-08-13 Thread vic
]] Sent: Tuesday, August 13, 2002 3:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks I think I'm on the right track with: ?php $i = $value++; // Show first link echo 'a href='.$PHP_SELF.'?add_form='.$value.' New paragraph

RE: [PHP] count link clicks

2002-08-13 Thread victor
: [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 12:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] count link clicks I think I'm on the right track