Ng Hwee Hwee wrote:

> but why is it that I still get a backslash
> before an occurrence of a single-quote?

for example, <td width="630" height="6"><? echo $fieldName; ?></td>

where $fieldName is retrieved from the database through:

Maybe magic_quotes_runtime is enabled? It will add slashes to data from files and databases. Bottom line, if you actually see the slashes in your data, in your database, then you're adding the slashes twice, somehow.

for example:
<input type="text" name="field1" size="20" value="<? echo $fieldName; ?>">

if $fieldName contains: it's name is "Bob", anything after the double quote (i.e. Bob") gets cut-off! it's disaster!!

You must convert the double quote to &quot; which is an HTML entity. Run $fieldName through htmlentities() before you place it within the value attribute.

---John Holmes...

Amazon Wishlist:

php|architect: The Magazine for PHP Professionals –

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to