$connect = mysqli_connect("localhost", "$user", "$pass", "$bd");
$sql = "INSERT INTO e-mails (email, ip) VALUES (?, ?)";
$stmt = mysqli_prepare($connect, $sql);
mysqli_stmt_bind_param($stmt, 'ss', $email, $_SERVER['REMOTE_ADDR']);
mysqli_stmt_execute($stmt);
mysqli_stmt_close($connect);