Jump to content

php automatically escaping single quotes


flash gordon

Recommended Posts

I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For instance I enter x' OR 1=1-- in a form and the output it gives me is x\' OR 1=1--.

 

Is there a setting in php or apache that automatically escapes single quotes?

cheers.

You should not rely on this function (as stated in manual). It's better to turn it off all together (if possible)

 

You should instead escape your data just before putting it into your database queries. Use specialised functions for that, like mysql_real_escape_string for ext\mysql

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.