I am just trying to get the variable to increment, than I will be working on a session. It's basically being used to keep track of correct/incorrect answers for an online quiz.
Here's what I am trying: if(!isset($correct)) { $correct = 0; } else { $correct++ } Shane -----Original Message----- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:06 PM To: Shane McBride Cc: PHP Subject: RE: [PHP] Simple: Whats wrong with this? Well I accidentally deleted your original email, but I didn't see where you were getting the counter variable from. Where is the variable being stored? You do know that setting $counter++ for one visitor, doesn't translate the value of $counter to another, right? On Wed, 2004-03-17 at 12:05, Shane McBride wrote: > It doesn't seem to work either way for me. > > Shane > > -----Original Message----- > From: Jake McHenry [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 17, 2004 12:01 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Simple: Whats wrong with this? > > > > No. > > > > $correct++; > > > > Is all you need for the second condition, it automatically sets itself > > back. > > > > > Does this always work? In my timesheet app, I have to do $counter = $counter > + 1, because for some reason the $counter++; doesn't work. It just doesn't > work, no incrementation of the variable. Is there something in php.ini that > can prohibit this from working? > > Thanks, > Jake > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php