Jump to content

Problem with apostrophe in text fields when submitted using php


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

Recommended Posts

Posted

When I’m entering info into a form field, if I put an apostrophe and then submit changes, it throws in a with the '

It saves the ' in the filemaker field also. This is a problem because the info is printed out in a report.

Is there a way to resolve this easily?

Posted

It sounds like your problem is with an extra addslashes() in the PHP. If your PHP installation is set up with magic quotes on, you'll automatically get escape codes in your data. You can test for the status of magic quotes:

if (!get_magic_quotes_gpc()) {

$yourdata = addslashes($_POST['yourdata']);

} else {

$yourdata = $_POST['yourdata'];

}

This topic is 6920 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.