Example #1
0
    $id = $_GET['codigo'];
    echo $class->excluirClientes($id);
    echo "<meta http-equiv='refresh' content=3;url='login.php'>";
} else {
    $nome = $_POST['nome'];
    $sobrenome = $_POST['sobrenome'];
    $email = $_POST['email'];
    $senha = md5($_POST['senha']);
    $action = $_POST['action'];
    if ($action == "add") {
        $class->inserirClientes($nome, $sobrenome, $email, $senha);
        //echo"<meta http-equiv='refresh' content=3;url='../login.php'>";
    }
    if ($action == "edit") {
        $id = $_POST['id'];
        echo $class->alterarClientes($id, $nome, $sobrenome, $email, $senha);
        echo "<meta http-equiv='refresh' content=3;url='cidade.php'>";
    }
    if (isset($_GET['acao'])) {
        echo $class->excluirClientes($id);
        echo "<meta http-equiv='refresh' content=3;url='cidade.php'>";
    }
}
?>


<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">