num_rows < 1) { error("streams", "You are not allowed to edit that stream"); } //Fix input $ip = rtrim($ip, "/"); $ip = ltrim($ip, "http://"); $ip = ltrim($ip, "https://"); $path = ltrim($path, "/"); //Check if stream is valid $resp = stream_verify($ip, $port, $path); if($resp === false) { error("streams", "Invalid stream"); } $ip = $resp; //Update stream $sql = "UPDATE `stream` SET `name`='$name', `ip`='$ip', `port`='$port', `path`='$path' WHERE `id`=$stream"; ExecQuery($mysqli, $sql); success("streams", "The stream has been updated"); ?>