On Monday 11 November 2002 17:59, Richard Allsebrook wrote: > One point nobody seems to have raised about why its important to quote > attribute values ... > > <? > $Value="foo bar"; > echo "<INPUT type=text value=$Value>"; > ?> > > will produce the following code in the browser > > <INPUT type=text value=foo bar> > > and renders in the browser (testing in ie6) as a text box containing only > the word foo > > (The browser sets the value to foo and things bar is an unknown attribute > so correctly ignores it) > > quoting the attribute value fixes it > > <? > $Value="foo bar"; > echo "<INPUT type='text' value='$Value'> > ?> > > produces > > <INPUT type='text' value='foo bar'>
The OP is aware of this and has pointed it out :) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Start every day off with a smile and get it over with. -- W.C. Fields */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php