Jump to content
Server Maintenance This Week. ×

Cut and Paste into PHP/FX TextArea field


This topic is 6615 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Howdy out there.

I've got a science conference registration system running on PHP/FX, FMP7 Server Advanced. One of the functions is for people to add an abstract of their presentation. The page works fine when you type in the data. But when you cut and paste into one field, the new record or edit record functions fail. That field is the abstract itself, and the pasted text can be long. But length does not seem to matter. What does seem to matter is whether or not the pasted text comes from a formatted Word file vs. a text-only ASCII file. Cutting and pasting from the ASCII files works; no error. The submission also works works if you cut and paste into other fields on the form from the same formatted Word doc. The difference is that those fields are whereas the broken one is a field.

I wonder if there is some PHP function that would strip formatting before the field goes into the database. Or maybe there is something about textarea fields and how one should handle them?

Thanks in advance.

Gary

Link to comment
Share on other sites

PHP has a few functions to handle this type of thing. However, the textarea may not be getting to the PHP (i.e. not leaving the browser).

PHP has "addslashes()", "convert_uuencode()", "htmlentities()", etc that can be used to condition strings. You can also check "magic_quotes" in the PHP documentation.

Good Luck.

Garry

p.s. You may also need to look at some Javascript functions.

Link to comment
Share on other sites

This topic is 6615 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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