有没有可能把它放在一个循环中?
if (!empty($_POST["textDE"])) {
$mysqli = $connect->prepare("INSERT INTO `l10n-strings` (`translationID`, `languageCode`, `text`) VALUES (?, ?, ?)");
$mysqli->bind_param('iss', $l10id, $languageCodeDE, $textDE);
$mysqli->execute();
}
if (!empty($_POST["textEN"])) {
$mysqli = $connect->prepare("INSERT INTO `l10n-strings` (`translationID`, `languageCode`, `text`) VALUES (?, ?, ?)");
$mysqli->bind_param('iss', $l10id, $languageCodeEN, $textEN);
$mysqli->execute();
}
if (!empty($_POST["textES"])) {
$mysqli = $connect->prepare("INSERT INTO `l10n-strings` (`translationID`, `languageCode`, `text`) VALUES (?, ?, ?)");
$mysqli->bind_param('iss', $l10id, $languageCodeES, $textES);
$mysqli->execute();
}
if (!empty($_POST["textFR"])) {
$mysqli = $connect->prepare("INSERT INTO `l10n-strings` (`translationID`, `languageCode`, `text`) VALUES (?, ?, ?)");
$mysqli->bind_param('iss', $l10id, $languageCodeFR, $textFR);
$mysqli->execute();
}
if (!empty($_POST["textIT"])) {
$mysqli = $connect->prepare("INSERT INTO `l10n-strings` (`translationID`, `languageCode`, `text`) VALUES (?, ?, ?)");
$mysqli->bind_param('iss', $l10id, $languageCodeIT, $textIT);
$mysqli->execute();
}