GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need Some PHP help from the gurus (https://gfy.com/showthread.php?t=554579)

JSWENSON 12-20-2005 09:08 AM

Need Some PHP help from the gurus
 
I need a php code sniplet that will increment a variable everytime a submit button is clicked. Another words it needs to count +1 everytime the submit is clicked. Thanks in advance.

dissipate 12-20-2005 09:09 AM

is this per user? or is this an overall count of the submit button

Screaming 12-20-2005 09:12 AM

how much you offering for this?

JSWENSON 12-20-2005 09:18 AM

per user
 
Quote:

Originally Posted by dissipate
is this per user? or is this an overall count of the submit button

It would need to be per user. Thanks

dissipate 12-20-2005 09:19 AM

you can use a mysql database to track thier IP, resetting it each day

darksoul 12-20-2005 09:43 AM

Code:

<?php
session_start();
$_SESSION['clicks']++;

echo "You clicked $_SESSION['clicks'] times dude!";
?>


JSWENSON 12-20-2005 09:45 AM

Thanks for the help
 
Quote:

Originally Posted by dissipate
you can use a mysql database to track thier IP, resetting it each day

Your suggestion gave me an idea that worked fine, thanks used the following:

if ($submit) {
$_SESSION[$accountselnum] = $_SESSION[$accountselnum] + 1;
}else {
$_SESSION[$accountselnum] = 0;
}

SMG 12-20-2005 10:08 AM

Quote:

Originally Posted by JSWENSON
Your suggestion gave me an idea that worked fine, thanks used the following:

if ($submit) {
$_SESSION[$accountselnum] = $_SESSION[$accountselnum] + 1;
}else {
$_SESSION[$accountselnum] = 0;
}

just remember that if that guy clicks, then goes to the page without clicking, that will reset his click count ... dunno if that matters to you but figured I'd say it anyway :P


All times are GMT -7. The time now is 02:35 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123