Toodles, y’all! o/ So this time I have code that should technically work, but doesn’t, practically. It’s a simple multiline echo to print some HTML into the browser, and for the most part, it works.
[php]<?php //formtest2.php
if (isset($_POST[‘name’]))
$name = $_POST[‘name’];
else
$name = “(Not entered)”;
echo <<<END
What is your name? END; ?>[/php]
It works perfectly, until you get to the last two lines. Apparently, it gets very comfortable being an echo, and doesn’t want to leave, because END isn’t called properly at all. Instead, the page draws up the HTML correctly, but deposits a neat
END; ?>below the input box as though it were part of the echo. Same thing happens when using apostrophes instead of <<<ECHO.
Any help is much appreciated. [:)]
UPDATE: Okay, this is even weirder: The code doesn’t work on my PC, but works on my mac. Same browser, same compiler, exact same code. Thoughts? [:S] [:P]