Re: How New Is <<<HERE?

From: Date: Fri, 26 Dec 2003 15:19:44 +0000
Subject: Re: How New Is <<<HERE?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173335@lists.php.net to get a copy of this message
Change: $txtBoxCounter = $_POST['txtBoxCounter] $hdnCounter = $_POST['hdnCounter] to $txtBoxCounter = $_POST['txtBoxCounter']; $hdnCounter = $_POST['hdnCounter']; (Notice the ' at the end of txtBoxCounter and hdnCounter. Merry X'mas stiano@Optonline.net wrote:
Okay, for everyone took a break for Christmas, and to update Jasper and Jeremy--who've tried big-time to help me--here's again the sitch and where I stand as of now. I'm on a Macintosh PowerBook running OS X.2.1 and PHP 4.3.0. I'm tryning to run the following code: <html> <head> <title> persistence demo </title> </head> <body> <h1>Persistence Demo</h1> <form> <?php //increment the counters $txtBoxCounter++; $hdnCounter++; print <<<HERE <input type = "text" name = "txtBoxCounter" value = "$txtBoxCounter"> <input type = "hidden" name = "hdnCounter" value = "$hdnCounter"> <h3>The hidden value is $hdnCounter</h3> <input type = "submit" value = "click to increment counters"> HERE; ?> </form> </body> </html> What that gets me is: Parse error: parse error, unexpected $ in [my path to this file] on line 33 register_globals is, of course, off. So I add $txtBoxCounter = $_POST['txtBoxCounter] and $hdnCounter = $_POST['hdnCounter] as separate line right after <?php. And that gets me an unexpected TVARIABLE message. Anyone, please? Thank you. Steve Tiano -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ .


« previous php.general (#173335) next »