The isset
accepts several parameters, thus:
if(isset($_POST['sd'], $_POST['video'])){
$sd = $_POST['sd'];
$vid = $_POST['video'];
$sql = "UPDATE `player` SET `sd` = '$sd', `video` = '$vid' WHERE `id` = 3";
$ssl = mysqli_query($conn, $sql);
$_SESSION['post'] = 'Configuração salva com sucesso!';
header("Location: edit.php");
exit();
}
For the record, I recommend you use mysqli_real_escape_string
to avoid Sqlinjection, thus:
if(isset($_POST['sd'], $_POST['video'])){
$sd = mysqli_real_escape_string($_POST['sd']);
$vid = mysqli_real_escape_string($_POST['video']);
$sql = "UPDATE `player` SET `sd` = '$sd', `video` = '$vid' WHERE `id` = 3";
Welcome to the Stackoverflow in Portuguese, to make good use of the site, please do the [tour], to learn more about it, go to [help].
– NoobSaibot