I transfer the data from the form to the POST request handler when the data is not filtered. The recording happens normally:

$pin = $_POST['pinx']; $valuex = $_POST['valuex']; $email = $_POST['emailx']; $valuez = $_POST['valuez']; $country = $_POST['countryx'] 

When I start filtering, empty values ​​come to the database:

  $pin = mysql_real_escape_string(strip_tags(stripslashes(trim($_POST['pinx'])))); $valuex = mysql_real_escape_string(strip_tags(stripslashes(trim($_POST['valuex'])))); $email = mysql_real_escape_string(strip_tags(stripslashes(trim($_POST['emailx'])))); $valuez = mysql_real_escape_string(strip_tags(stripslashes(trim($_POST['valuez'])))); $country = mysql_real_escape_string(strip_tags(stripslashes(trim($_POST['countryx'])))); 

All data comes either in numbers or in the English layout, the encoding of the base, as well as the utf-8 script.

  • What version of PHP? And use mysqli :: escape_string - Urmuz Tagizade
  • 5.4, ​​now replaced by 5.2, check it out. - user197085
  • Is MySQL connected? The fact is that mysql_real_escape_string () works only when the connection to the database is established. - cheops

1 answer 1

Try to infer these variables after filtering; if empty, try one function at a time to find which one resets.