Gnurps Posted March 14, 2006 Posted March 14, 2006 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
Garry Claridge Posted March 15, 2006 Posted March 15, 2006 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.
Gnurps Posted March 16, 2006 Author Posted March 16, 2006 Maybe the htmlspecialchars function will do the job. I'll give it a try.The real challenge here is the diagnosis! Thanks,Garry. --Gary
Recommended Posts
This topic is 7164 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 accountSign in
Already have an account? Sign in here.
Sign In Now