[Sysadmin] PHP list posting confirmation for sysadmin at lists.evolt.org

PHP Lists Automoderator confirm at lists.php.net
Tue Mar 25 01:40:08 CST 2003


Because you are not subscribed to "php-general at lists.php.net"
using the email address "sysadmin at lists.evolt.org", your message
has been held until you can confirm that you are a real person sending
mail.

All you have to do in order to have your original message sent is send
an email to confirm at lists.php.net with the following text (square
brackets and all):

[confirm: 05a869a1b27f0cf093b8f4f09e844f7e sysadmin at lists.evolt.org]

which you should be able to do simply by responding to this email.
(Don't worry, any leading text added for quoting will simply be
ignored.)

After we have received your confirmation, "sysadmin at lists.evolt.org"
will be added to the list of pre-approved mail addresses for all of
the PHP mailing lists, your original message will be delivered, and
future emails from that address will be posted to the list
automatically.

You will not receive any confirmation of your confirmation -- your
original message (and any other messages you have sent since then)
will simply be sent to its original destination (possibly after a
short delay).

Sorry for the hassle, but the volume of unsolicited commercial
email sent to PHP mailing lists has made this step necessary.

(Note that the newsgroups available at news://news.php.net/ are
simply gateways to the mailing lists, which is why you may have
gotten this email as a result of posting to those newsgroups.)

--- Your original email is below.

Received: (qmail 53228 invoked from network); 25 Mar 2003 07:40:08 -0000
Received: from unknown (HELO acornparenting.org) (216.40.227.23)
  by pb1.pair.com with SMTP; 25 Mar 2003 07:40:08 -0000
Received: (qmail 11448 invoked by alias); 25 Mar 2003 07:40:07 -0000
Received: (qmail 11442 invoked from network); 25 Mar 2003 07:40:06 -0000
Received: from pb1.pair.com (216.92.131.4)
  by 0 with SMTP; 25 Mar 2003 07:40:06 -0000
Received: (qmail 52712 invoked by uid 1010); 25 Mar 2003 07:40:04 -0000
Mailing-List: contact php-general-help at lists.php.net; run by ezmlm
Precedence: bulk
list-help: <mailto:php-general-help at lists.php.net>
list-unsubscribe: <mailto:php-general-unsubscribe at lists.php.net>
list-post: <mailto:php-general at lists.php.net>
Delivered-To: mailing list php-general at lists.php.net
Received: (qmail 52598 invoked from network); 25 Mar 2003 07:40:03 -0000
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.5
Date: Tue, 25 Mar 2003 18:45:35 +1100
From: Justin French <justin at indent.com.au>
X-Evolt-To: Sebastian <sebastian at dslr.net>,
To: dmah at shaw.ca php list <php-general at lists.php.net>
Message-ID: <BAA6544F.23329%justin at indent.com.au>
In-Reply-To: <000901c2f295$270ce2c0$a8a13f44 at level3>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Subject: Re: [PHP] counting ..

Use $num as a global value across all pages, through GET, and use $i for a
per-script counter.  Increase both in a loop, add some navigation, and
you're all set...

This should be a starting point...

<?
$total_num = 137;
$per_page = 25;

// find value of $num, or start from zero
if(isset($_GET['num'])) { $num = $_GET['num']; } else { $num = 0; }

$i = 0;

while( ($i < $per_page) && ($num < 137) )
    {
    // increase "global" counter
    $num++;
    
    // increase "local" counter
    $i++;
    
    // do something here 25 times
    echo "{$i} - {$num} <br />";
    }

$last = $_GET['num'] - $per_page;

if($num > $per_page) {
  echo "<a href='{$_SERVER['PHP_SELF']}?num={$last}'>last {$per_page}</a>";
  echo " | ";
}

if($num < $total_num) {
  echo "<a href='{$_SERVER['PHP_SELF']}?num={$num}'>next {$per_page}</a>";
}
?>


Cheers,
Justin French



on 25/03/03 5:09 PM, Sebastian (sebastian at dslr.net) wrote:

> Hello all.
> 
> rather dumb question.
> 
> I have a pagination system, 25 results per page, which are user comments, I
> want to put a number on each comment so i am doing something like:
> 
> $num=$num + 1;
> $number = $num;
> echo $number;
> 
> But when i switch to the next 25 results it starts counting from 1 again,
> LoL.
> 
> So i have to use $_GET right? If so can someone give me an example.
> 
> Thanks in advanced.
> 
> 
> cheers,
> - Sebastian
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


More information about the Sysadmin mailing list