I'm actually looking for an alternative to mysql_real_escape_string to solve this error. in php 5.4 it worked perfectly but no longer in php 5.5
$this->mysqli = new mysqli($this->host, $this->user, $this->pass, $this->name);
// in class user
public function __set($p_sProperty, $p_vValue)
{
switch($p_sProperty)
{
// this is marked as the error
case "Email":
$this->Email = **mysql_real_escape_string**($p_vValue);
break;
}
}
You using MySQLi so use mysqli_real_escape_string()
:
$this->Email = $this->mysqli->real_escape_string($p_vValue);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With