On Nov 4, 2003, at 6:27 PM, Jay Frumkin wrote:

Hi all,

I am having a bit of a problem, and was wondering if you could help?

Here's the sample code (very simple)

<?php

$xyz = "Hello World";

echo "<form><input type=test size=25 value=$xyz></form>";

?>

The text box shows up with "Hello" NOT "Hello World". How do I get the
entire variable?

If you look at the HTML returned, you'll probably see World at the very end of the input tag. To fix this, put quotes around the value attribute. Really, it's good practice to put quotes around all attribute values in HTML:
echo "<form><input type=\"test\" size=\"25\" value=\"$xyz\"></form>";


HTH

--
Chris Garaffa
Nil Zero Heavy Industries
http://moondrop.nilzero.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to