RE: Data not fetching in the textfield.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Date: Wed, 26 Sep 2007 09:33:40 -0700
> From: chandan9sharma@xxxxxxxxx
> 			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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux