Jump to content


Photo

apostrophe in php/mysql syntax


  • Please log in to reply
4 replies to this topic

#1 jwwceo

jwwceo
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts

Posted 14 September 2006 - 09:00 PM

I have a product in my database with an apostrophe. It works fine on the website, however, when I go to the edit product page, where there is a form to edit the product, the current value is supposed to be in the text field already. The only data being displayed in the text box is the info before the apostrophe. This is more of an annoyance, instead of a major problem, since this is only on the back end...but there must be a way around it...

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 14 September 2006 - 09:05 PM

Try passing the value through htmlentities.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 Wintergreen

Wintergreen
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 14 September 2006 - 09:08 PM

Can you show the code you're using to display it?

#4 jwwceo

jwwceo
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts

Posted 15 September 2006 - 11:34 PM

This is what I'm trying to dispay on my page. The 'I'm huge in Japan" needs to be inside the form when the page loads so the user can edit it...

but it just put the "I" in the text box..

<INPUT TYPE='TEXT' NAME='name'  class='cartForm' size=50 value='I'm Huge in Japan'></TD>

#5 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 15 September 2006 - 11:44 PM

Use double quotes to surround your value.

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users