if($_SESSION['s_logged_n'] == 'true'){
$server = $panel->real_escape_string($_GET['ip']);
$dn = $panel->real_escape_string($_GET['newname']);
$query = $panel->query(
"UPDATE `Registered` SET `displayname` = '$dn' WHERE `owner`='".$_SESSION['s_username']."' AND `server`='$server'"
);
}
Above is the code that I am using. $panel is a connection to the database, which works. I’ve been banging my head for hours working with this stuff in order to try and escape the quotes.
You are not using
mysqli_real_escape_stringyou are using the methodreal_escape_stringthat belongs to the objects$panelnow if that is just another name formysqli_real_escape_stringthen it is not used to “strip” quotes, it is used to make a legal SQL query. Quotes are not an illegal entity. I would suggest simplystr_replace()if you want to specifically target quotations.EDIT
jeroen beat me in the comments :p