Answer the question
In order to leave comments, you need to log in
How to fix php code?
Hello, please help, is there such a function
public function remove_icon($icon) {
global $db;
if(!isset($this->icon[$icon]))
return;
unset($this->icon[$icon]);
$db->execute("UPDATE `players` SET `icon`='{$db->safe(json_encode($this->icon))}' WHERE `id`='{$db->safe($this->id)}'")or die($db->error());
}
$pl->remove_icon((int) $_POST['icon']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question