Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given… what I do wrong?
You are mixing mysqli and mysql function. If your are using mysql function then instead mysqli_real_escape_string($your_variable); use If your using mysqli_* function then you have to include your connection to database into mysqli_real_escape function : Note : Use mysqli_* function since mysql has been deprecated. For information please read mysqli_*