I am currently using mysqli and I want to properly sanitize every user input. I am looking for the easiest easy way to do this, since I understand that Im should NOT use mysql_real_escape ....
my request looks like this
$stmt = $sql->prepare("INSERT INTO Persons (msg, ip, time, main, twit, city, lat, lon, lang)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
since I understand that I have to use the bindParam function ... If I use it that way, am I sure I provide my user inputs?
$stmt->bind_param('sssssssss', $_POST[msg], ('$ip'), ('$date'), '$_POST[main]', '$_POST[twit]', ('$cit'), ('$lat'), ('$lon'), '$_POST[lang]');
$stmt->execute();
$stmt->close();
If this does not protect my user inputs, how to do it right?