Sweet... Thank you. Works perfectly.
You all have be most helpful. Hope this works in Smarty.... Gerard ----- Original Message ----- From: "CPT John W. Holmes" <[EMAIL PROTECTED]> To: "Gerard L Petersen" <[EMAIL PROTECTED]>; "Php-General" <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 4:07 PM Subject: Re: [PHP] Repopulating forms > From: "Gerard L Petersen" <[EMAIL PROTECTED]> > > My code looks like this. > > > > <?PHP > > $test = "gerard's name is \"gerard\""; > > echo $test."<br>"; > > echo '<input type="text" name="test2" value="'.$test.'"><br>'; > > ?> > > Just like HTML doesn't render newlines, it also doesn't understand using the > \ character as an escape character. You are creating this: > > <input type="text" name="test2" value="gerard's name is "gerard""> > > So, HTML takes the first bit between double quotes and ignores the rest as a > unknown attribute. > > Run htmlentities() on $test before putting it in the INPUT element to change > the quotes to HTML entities. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php