that was it! thanks! i needed the 'else' statement in there. odd though, i assumed it would default to that, but oh well. thanks a lot!
by the way, Ignatius, i tried your way with the same result. i still need that 'else'. thanks again guys! "Rich Gray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > So you're doing this right? > > <?php > > if (!isset($_GET['i'])) { > $i = 1; > } > else $i = $_GET['i']; > > echo $i."<BR>"; > > $i++; > > echo "<a href=\"passtest.php?i=".$i."\"/>Press to continue</a>"; > ?> > -----Original Message----- > From: db [mailto:[EMAIL PROTECTED]] > Sent: 09 October 2002 15:58 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] problem passing variables... > > > at first, it was as though no variables were passed so the output looked > like: > > 1 > Press to continue > > pressing to continue added '?i=2' to the address, but the output remained > the same. > > then, as per Rich Gray's suggestion, i capitalized $_GET (from '$_get'), > which had weirder results. $i is no longer echo'd after clicking the link. > also, the link, which originally tries to pass i=2, passes i=1 and doesn't > increase after clicking it. > > odd, huh? > > "H Marc Bower" <[EMAIL PROTECTED]> wrote in message > 000001c26f9e$3b6fe520$0b00a8c0@mbower">news:000001c26f9e$3b6fe520$0b00a8c0@mbower... > > What output *are* you getting? > > > > (V) > > > > "db" <[EMAIL PROTECTED]> wrote in message > > news:<[EMAIL PROTECTED]>... > > > i've seen a lot of posts about this, but none helped. i've broken the > > script > > > down to its simplest components and still no luck. > > > > > > <?php > > > > > > IF(!isset($_get['i'])) { > > > > > > $i = 1; > > > > > > } > > > > > > echo $i."<BR>"; > > > > > > $i++; > > > > > > echo "<a href=\"passtest.php?i=".$i."\"/>Press to continue</a>"; > > > > > > ?> > > > > > > i've tried using empty(), $_post['i'] and $i, but none will work. i've > > been > > > trying to pass the variable back to the page itself so that $i keeps > > > increasing by 1 with each click. not that there's a use for this other > > than > > > my figuring out how to use it. > > > > > > any thoughts? > > > > > > btw, i'm running Apache v1.3.26 w/ php v4.2.3 / MySQL v3.23.52 on a > > Win2kPro > > > (SP3) machine. > > > > > > thx! > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002 > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php