Re: ECHO $variable

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

 



On Sun, October 8, 2006 1:39 am, Ron Piggott (PHP) wrote:
> In one of my scripts I have
>
> <input type=text name="message_title" size=40 maxlength=80
> value="<?echo
> $saved_message_title;?>">
>
> where
>
> $saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
> cares about you"
> --- note the "
>
> When this is displayed on the screen $saved_message_title reads
>
> 1 Peter 5:7
>
> I am assuming the " closes the value=

Yup.  Use "View Souce" in your browser to confirm that.

> How may I echo this to the screen and have the full text be displayed,
> not just 1 Peter 5:7 ?

*ALL* data going to HTML should have http://php.net/htmlentities
called on it.

This will convert " to &quot; so that it is properly escaped for HTML
output.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux