Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have discovered that i have magic quotes turned on in my php.ini file. If I turn them off will this affect the FX.php plug-in adversely? I can't validate apostrophes in text fields using regular expressions while mahic quotes are turned on.

Posted

I can't validate apostrophes in text fields using regular expressions while mahic quotes are turned on.

... Why not?

Use an escape character: e.g. '''

Posted

See http://www.jimmysworld.org/article.html?aID=59 re how annoying magic quotes are.

Here's the code:

if(preg_match('/^[a-zA-Z0-9'-, ]+$/', $payername_1) != 1) {$errors['payername']= 'The payer name may only contain text.';}

If I add '

if(preg_match('/^[a-zA-Z0-9'-,' ]+$/', $payername_1) != 1) {$errors['payername']= 'The payer name may only contain text.';}

the script still rejects apostophes.

Cheers,

Steven

Posted

Anyway, better idea:

if( get_magic_quotes_gpc() )

$payername_1 = stripslashes($payername_1) ;

then do your preg_matching.

  • 2 weeks later...
Posted

Thanks Genx,

A friend suggested I run phpinfo.php to see where in our server the magic_quotes_gpc file was located. It was found without difficulty and our IT Manager switched the annoying things off. It hasnt had any advers effect on FX.php or our system.

Thanks,

Steven

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