there is
<textarea></textarea>
I receive data
$data = $_REQUEST['name'];
But if I enter in the input field, 'then the sql query does not work.
Question : how to correctly and safely receive the text? (And with html markup, and without.)
$data = mysql_real_escape_string($_REQUEST['name']);
$data = mysql_real_escape_string(trim(htmlspecialchairs($_REQUEST['name'])));
then it is possible for loyalty in htmlentities($str, ENT_QUOTES, "UTF-8");
drive (encoding and string substitute your own)
Threat it's time to go on mysqli)
Source: https://ru.stackoverflow.com/questions/134293/
All Articles