RE: [PHP-DB] Data not fetching in the textfield.

From: Date: Wed, 26 Sep 2007 16:53:17 +0000
Subject: RE: [PHP-DB] Data not fetching in the textfield.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-44065@lists.php.net to get a copy of this message
> Date: Wed, 26 Sep 2007 09:33:40 -0700 > From: chandan9sharma@yahoo.com > echo("<input name=\"input1\" type=\"text\" > value=$rows[0]>"); If what you want rendered in html should have quotes like so: <input name="input1" type="text" value="some value"> Double quote the value like so: echo("<input name=\"input1\" type=\"text\" value=\"" . $rows[0] . "\">"); and escape $rows[0] in case it contains any double quotes thusly (or with some other escape function): echo("<input name=\"input1\" type=\"text\" value=\"" . addcslashes($rows[0], '"') . "\">"); _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx

« previous php.db (#44065) next »