values

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

values

Post 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?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Use quotes around your value attribute.

Code: Select all

echo ".... value=\"$Address\" ........" ;
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post by ekosoftco »

lol, opppsss.
thanks :)
Post Reply