32 lines
721 B
PHP
32 lines
721 B
PHP
<?php
|
|
|
|
require '../config/function.php';
|
|
|
|
$paramResult = checkParamId('id');
|
|
if(is_numeric($paramResult))
|
|
{
|
|
$id = validate($paramResult);
|
|
$registration = getById('tbl_registrations',$id);
|
|
if($registration['status'] == 200)
|
|
{
|
|
$registrationDeleteRes = deleteQuery('tbl_registrations',$id, 'LIMIT 1');
|
|
if($registrationDeleteRes)
|
|
{
|
|
redirect('index.php','Eintrag wurde erfolgreich entfernt','success');
|
|
}
|
|
else
|
|
{
|
|
redirect('index.php','Ein Fehler ist aufgetreten','danger');
|
|
}
|
|
}
|
|
else
|
|
{
|
|
redirect('index.php',$registration['message'],'danger');
|
|
}
|
|
}
|
|
else
|
|
{
|
|
redirect('index.php',$paramResult,'danger');
|
|
}
|
|
|
|
?>
|