PHP post counter
1
Name:
Anonymous
2010-01-18 15:19
Hey /b/oys.
Ive made a bbs in PHP but i need a post counter on it. how would one go about inserting a post counter into the PHP script??
2
Name:
Anonymous
2010-01-18 15:25
postcount++;
3
Name:
Anonymous
2010-01-18 15:31
>>1
/b/oys
Where exactly do you think you are?
4
Name:
Anonymous
2010-01-18 15:34
<?php echo "here be a post counter;" ?>
5
Name:
Anonymous
2010-01-18 16:05
Well, you're storing posts somewhere, right? How about you count them?
6
Name:
Anonymous
2010-01-18 17:42
Strange name for a counter, but here you go:
(define make-counter
(let ((n 0)
(inc (λ(x) (+ 1 x))))
(λ()
(λ()
(set! n (inc n))
n))))
(define php-counter (make-counter))
7
Name:
Anonymous
2010-01-19 3:57
<?/*
/*************************************\
* COUNTER SCRIPT v2.3 *
***************************************
* DO NOT USE WITHOUT ASKING ME FIRST. *
***************************************
* (C) 2004 XDEVPUPPY234X @ HOTMAIL . COM *
*/
$var1 = 'PUT NUMBER HERE';
function do_c($var1){
if($var1 == 'PUT NUMBER HERE') {
die('WRONG NUMBER!');
}
global $var1;
$COUNTER= 0;
$looper=array_fill($COUNTER, $var1, $COUNTER);
foreach($looper as $loopy) { // HEHE :P
if($counter < $var1) {
//if($counter == 1) {echo "COUNTING 1!";
//if($counter == 2) {echo "COUNTING 2!";
//if($counter == 3) {echo "COUNTING 3!";
//if($counter == 4) {echo "COUNTING 4!";
//if($counter == 5) {echo "COUNTING 5!";
//if($counter == 6) {echo "COUNTING 6!";
//if($counter == 7) {echo "COUNTING 7!";
//if($counter == 8) {echo "COUNTING 8!";
//if($counter == 9) {echo "COUNTING 9!";
if($counter == $var1) { echo "DONE!";
} else { echo "COUNTING!";
echo $counter; // PHEW, MUCH BETTER! THANKS DARKXXSONIC!
echo "<BR>";
}
$counter =$counter+++1; // FIXED 10-09-04
}
}// if($counter == $var1)
return $var1;
}
/***************\
* CODE COMPLETE*
\***************/
?>
8
Name:
Anonymous
2010-01-22 9:40
>>7
Oh God I lol'd so hard
9
Name:
Anonymous
2010-01-22 13:13
10
Name:
Anonymous
2010-01-22 13:23
11
Name:
Anonymous
2010-01-22 14:59
>>7
I've worked with a "web developer" before. This isn't far from reality.
And OP, if you want a serious answer, read the futaba source code.
12
Name:
Anonymous
2010-01-22 15:50
You want to count posts in a thread?
Have you tried mysql_num_rows($shittyMySQLresourceGoesHere) ? Assuming of course you were smart enough to store threads in MySQL that is, of course.
13
Name:
Anonymous
2010-01-22 15:52
>>7
Dear god, I rofl'd so hard I heard something pop
14
Name:
Anonymous
2010-01-22 15:57
>>13
You should probably see a doctor about that.
15
Name:
Anonymous
2010-01-22 16:00
POP MY CHERRY ANUS
16
Name:
Anonymous
2010-01-22 16:07
>>12
smart
mysql
faceface.face
18
Name:
Anonymous
2010-12-10 1:05
19
Name:
Anonymous
2011-02-03 5:11
Wow, this list is great! There are so much things that I really need to learn how to do, but just not doing them. It is time for
me to stop procrastinating and give the list a try.
21
Name:
Anonymous
2013-07-13 17:39
[# ][code][u][i][o][b][aa][m][sup][sub][rem][spoiler][math]HA HA HA I HAVE MASTERED Le [/math][/spoiler][/rem][/sub][/sup][/m][/aa][/b][/o][/i][/u][/code][/# ]