Exemple #1
0
                echo "<script language='JavaScript'>alert('Modificacion Correcta');\n                location.href='../../principal.php';</script>";
            } else {
                echo "<script language='JavaScript'>alert('Se produjeron errores en la modificacion');\n                location.href='../../principal.php';</script>";
            }
        } else {
            ?>
<!DOCTYPE html> 
<head>
            <script type="text/javascript">
            function volver()
            {history.back();}
        </script>
</head>
<body> 
<?php 
            $datosCargo = $instanciaCargo->extraer_datos_cargo($_REQUEST['valor']);
            foreach ($datosCargo as $data) {
                ?>
  <section class="contenido">
    * Campos con asterisco son obligatorios
    <h2 align="center">MODIFICAR CARGO</h2>
    <form action ="modificar.php">
        <h3 align="center"> 
            Nuevo nombre del cargo
        <input type ="text" value="<?php 
                echo $data["descripcion"];
                ?>
" required pattern="[A-Za-z\s]{3,30}" name="descripcion" size="30" maxlength="30">*</h3>
        <input type ="hidden" value="<?php 
                echo $_REQUEST['valor'];
                ?>