Jump to content

Some Form Entries Cause SQL Error


Hartley

Recommended Posts

Some members on my site have been getting SQL errors from entries if they use any special characters (' " \, etc). For sake of example, say $entry is a variable declared to hold the value of an entry. How can I adjust $entry so that any special characters will be put into the database correctly without error.

Link to comment
https://forums.phpfreaks.com/topic/62834-some-form-entries-cause-sql-error/
Share on other sites

This isn't just a matter of nice output, but also security.

 

Lots of people found out the hardway that you can inject SQL commands into form data very easily and retrieve admin passwords, delete tables etc. etc. if it isn't screened before being put into the SQL command

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.