D
D
Dmitry Skogorev2016-06-26 18:29:09
PHP
Dmitry Skogorev, 2016-06-26 18:29:09

How to filter email from sql injection?

Good day.
What is the most efficient way to filter email with sql queries?
filter_var($email, FILTER_VALIDATE_EMAIL)
does not cut off, for example, a single quote
, I think to remove all special characters except [email protected]
tell me best practice

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2016-06-26
@OnYourLips

You are doing something crazy. You don't need to filter anything.
An article about working with SQL in PHP: https://habrahabr.ru/post/148701/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question