Re: Double parenthesis crisis
| From: | Justin Patrin | Date: | Thu, 08 Jul 2004 00:44:17 +0000 |
| Subject: | Re: Double parenthesis crisis | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189933@lists.php.net to get a copy of this message | ||
You want htmlentities(), not addslashes().
On Wed, 7 Jul 2004 20:35:54 -0400, Ryan Schefke <ryan@triomfgroup.com> wrote:
> In the below code the variable $thecomments might have some quotations in
> it. Like:
>
> $thecomments = how you "like me now"
>
> I'm trying to display the value of that variable in an input box using the
> value=" " as shown below; however, the double quotations are screwing me up.
> Can someone please make some suggestions on how I can fix this. I've tries
> several combinations.addslashes, value= (no quotations, etc). Thanks.
>
> $thecomments = addslashes($row_allitems[6]);
>
> // echo $thecomments;
>
> // this is the section to list the instructions
> comments
>
> echo
>
> "<tr>
>
> <td colspan=\"2\" > <div
> align=\"right\">Instructions/comments:</div></td>
>
> <td colspan=\"3\"> <div
> align=\"left\">
>
> <input
> name=\"instructionslist[$row_allitems[0]]\" type=\"text\"
> size=\"50\"
> maxlength=\"255\" value=$thecomments></td>
>
> </div></td>
>
> </tr>";
>
> !DSPAM:40ec94f2143861361910547!
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--