Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

An Easy One: ' and " appear as \' and \"

Featured Replies

I have a database set up to receive form information. The pages are written making use of PHP and Chris Hansen's FX. Works great.

I just noticed, however, that the symbols ' and " appear as ' and ". The backslashes get put into the database field. It happens on text fields and textareas.

Can anyone give me a push here? Thanks in advance for the help.

O_W

Quotes are always a problem when using "middleware". Hence, one way of dealing with them is to "escape" them with a "".

If you need them removed you will be able to do something about it. What to do, depends on what your needs are.

Good Luck.

Garry

As Garry mentions, is a single-character escape character so PHP ignores whatever follows. I guess FileMaker already auto-converts other characters for you, too... For exmple, in a php/mysql thing I am working on, I am trying to allow raw data into the db with no character conversion so that looking at the db directly shows normal characters... but if somone were to enter data that was HTML code like <BR>, it ends up getting into the php-generated HTML page as an actual line break. I have to use PHP's htmlspecialchars() function on every field when I display it if I want to keep people from being able to markup their own data. htmlspecialchars() works on quotes, too, I think. I can use it when the data goes in, too, I suppose, but if I have to do it anyway, I'd rather do it on the showing of the data rather than storing it already converted for web viewing.

HERE IS THE PHP MANUAL PAGE that talks about strings and single/double quotes.

--ST

  • Author

Gary and Steve,

Thanks very much for your good ideas.

I found the solution I needed in the stripslashes() command. Very handy!

Best,

DSW

Nice one :

All the best.

Garry

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.