MySQL / PHP / Escaping the "

by Nathan Lyle <nathan(at)upwebmaestro.com>

 Date:  Tue, 11 Jun 2002 00:23:05 -0400
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
If you respond to this and see no response from myself, it's probably
because my current host sucks (I've just found this out) and is down
often - including my email for this domain. :-/ (So, if I'm not back
in 1 hour... wait longer.)  <grin>

Anyway, my problem is this. I'm using PHP to sculpt a page around the
results of a MySQL query (great so far) but I'm not sure how to handle
results from MySQL with quotes in them. For example, one field is
"dimension" which can have values like: 2" x 30" x 1'

When I toss that value into a line attempting to display a form field,
the resulting html thinks the first quote in the value is the end
quote for the form vield "value" attribute.

I've done some quick searching online for the solution and have come
up blank so far.

Help?

~ The U.P. Web Maestro (Nathan Lyle)

  E-Mail: nathan(at)upwebmaestro.com
  Online: www.upwebmaestro.com
   Phone: (906)485-4806

"640K ought to be enough for anybody." - Bill Gates, 1981.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA