Add files via upload

This commit is contained in:
OscarRui
2021-05-07 19:07:03 +02:00
committed by GitHub
parent 59a89cff30
commit 3e48951b90
2 changed files with 32 additions and 3 deletions

View File

@ -35,6 +35,11 @@ class FormHall extends Form {
';
if($data['option'] == "new_hall")
$htmlform .= '<button type="submit" name="new_hall" class="button large">Crear</button><br>';
if($data['option'] == "edit_hall"){
$htmlform .= '
<button type="submit" name="edit_hall" class="button large">Editar</button><br>
<button type="submit" name="delete_hall" class="primary">Borrar</button><br>';
}
$htmlform .= '
</fieldset>
@ -80,9 +85,14 @@ class FormHall extends Form {
if($data["option"] == "new_hall"){
$_SESSION['msg'] = Hall::create_hall($data);
header( "Location: ../?state=success" );
}else {
}
}else if($data["option"] == "edit_hall"){
$_SESSION['msg'] = Hall::edit_hall($data);
header( "Location: ../?state=success" );
}
else if($data["option"] == "delete_hall") {
$_SESSION['msg'] = Hall::delete_hall($data);
header( "Location: ../?state=success" );
}
}
}