How New Is <<<HERE?
| From: | stiano@Optonline.net | Date: | Fri, 26 Dec 2003 14:40:56 +0000 |
| Subject: | How New Is <<<HERE? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173334@lists.php.net to get a copy of this message | ||
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/ .