Page 1 of 1

values

Posted: Wed May 30, 2007 10:46 pm
by ekosoftco
i have a list for account info, and one part is

Code: Select all

$Address = str_replace("_", " ", $row['Address']);
	echo "<tr><td><font size=2>Address:</td><td><input type=text name=address maxlength=255 value=$Address></td></tr>";
i pull the address field from the database, and everything connects fine, but if the original address is 324 red ln, in the input it only shows 324 and cuts off at the first "_" or whitespace, the exact same script works fine when its not in input, is there a reason it doesnt work in input?

Posted: Wed May 30, 2007 10:50 pm
by s.dot
Use quotes around your value attribute.

Code: Select all

echo ".... value=\"$Address\" ........" ;

Posted: Wed May 30, 2007 10:54 pm
by ekosoftco
lol, opppsss.
thanks :)