Пример #1
0
    $dia  = " ";
    $mes  = " ";
    $año  = " ";
    while ($tok !== false) {
    		 
    		 $año =strtok("/"); 
    		 $mes =strtok("/");
    		 $dia =strtok("/");  
    		  
    }
    */
    $fechaNaci = "1994-09-01";
    $tiposuper = $_POST['tipoSuper'];
    $s = new supervisor($_POST['nombSuper'], $_POST['apelSuper'], $_POST['idenSuper'], $fechaNaci, $_POST['geneSuper'], $_POST['ciudSuper'], $_POST['correoSuper'], $_POST['tipoSuper']);
    //  echo $s->getIdentificacion();
    $bool = $m->Insert("persona", "" . $s->getIdentificacion() . ",'" . $s->getNombres() . "','" . $s->getApellidos() . "','" . $s->getGenero() . "','" . $s->getFechaNaci() . "','" . $s->getCiudad() . "','" . $s->getCorreo() . "'");
    $bool1 = $m->Insert("supervisor", $s->getIdentificacion() . ",'" . $s->getTipoSupervisor() . "'");
    $t = " ";
    if ($tiposuper == "Practicas") {
        $t = "12";
    } else {
        $t = "13";
    }
    $bool2 = $m->Insert("cuenta", $s->getIdentificacion() . ",'" . $s->getCorreo() . "','" . $t . "'");
    if ($bool == true && $bool1 == true && $bool2 == true) {
        ?>
           
           <script type="text/javascript">
           
		     alert("Supervisor registrado con exito");
		      window.location = "../CapaPresentacion/z-Supervisor/registroSupervisor.php";