March 14, 200619 yr 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
March 15, 200619 yr 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.
March 16, 200619 yr Author Maybe the htmlspecialchars function will do the job. I'll give it a try.The real challenge here is the diagnosis! Thanks,Garry. --Gary
Create an account or sign in to comment