Re: text input truncated

From: Date: Tue, 04 Nov 2003 23:54:27 +0000
Subject: Re: text input truncated
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168529@lists.php.net to get a copy of this message
--- Daniel Clark <dclark@nwlink.com> wrote: > > $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? > > I would try single quotes here. > > $xyz = 'Hello World'; That's good advice in general, but this error is the fault of the output of the variable, not its creation. HTML attributes (such as value) should be quoted. Always. Hope that helps. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp

« previous php.general (#168529) next »