SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Inicio de la pagina web
Direccion URL:
              http://jacqueline.systemsecret.net

Codigo – Conexión

<?php
  $host = "localhost";
  $user = "system_user";
  $password = "12345*";
  $db   = "system_colegio";
?>

Codigo – Index
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pagina Principal</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
<font face="Monotype Corsiva">
 <table width="800" border="0">
  <tr>
    <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td>
  </tr>
  <tr>
  <tr>
    <td colspan="5">
    &nbsp;
     <div align="center">
       <table width="200" height="150" border="0">
       <form action="que desea hacer.php" method="post">
         <tr>
          <td colspan="2"><div align="center"><h1><strong>Iniciar Sesion</strong></h1>
          </div></td>
         </tr>
         <tr>
          <td width="60%"><div align="right"><strong>Usuario</strong></div></td>
          <td width="35%"><input type="text" name="txtUsser" id="txtUsser"/></td>
         </tr>
         <tr>
          <td><div align="right"><strong>Contraseña</strong></div></td>
          <td><input type="password" name="txtPass" id="txtPass" /></td>
         </tr>
         <tr>
          <td colspan="2"><div align="right">
           <input type="submit" name="btnEnviar" id="btnEnviar" value="Enviar" />
          </div></td>
         </tr>
       </form>
</table>
     &nbsp;
   </div></td>
  </tr>
  <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  </tr>
 </table>
</div>
</body>
</html>




Usuario: usuario
Contraseña:usuario


Codigo-Que Desea Hacer

<?php
include("conexion.php");
session_start();
$_SESSION['Usuario']=$_POST['txtUsser'];
$_SESSION['Contraseña']=$_POST['txtPass'];

if(isset($_SESSION['Usuario']) && !empty($_SESSION['Usuario']) && isset($_SESSION['Contraseña']) &&
!empty($_SESSION['Contraseña']))
{
   $con = mysql_connect($host, $user, $password) or die("Problemas con Server");
          mysql_select_db($db, $con) or die("Ploblemas con BD");
   $seleccion = mysql_query("SELECT Usuario, Clave FROM Registros WHERE Usuario =
'$_POST[txtUsser]'", $con);
   $sesion = mysql_fetch_array($seleccion);
   if($_POST['txtPass'] == $sesion['Clave'])
   {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Que Desea Hacer?</title>
</head>

<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="leonel">
<center>
<table width="800" border="0">
  <tr>
   <td colspan="5"><div align="center"><img src="banner.jpg" width="800" height="250" /></div></td>
  </tr>
<tr>
  <td colspan="2"><div align="center"> <h2><strong>Que Desea Hacer?</strong></h2></div></td>
  <td align="right"><a href="index.php"><h3>Salir</h3></a></td>
  </tr>
<tr>
<td align="center"><a href="listado.php">Realizar Operacion</a></td>
 <td align="center"><a href="ver.php">Consultar</a></td>
          </tr>
       </table>
   &nbsp;
   </div></td>
       </tr>
 </tr>
  </table>
</div>
</body>
</html>
<?Php
   }else{
echo "<h1>Usuario o clave incorecta</h1>";
           header ("refresh:2; url = index.php");
   }
}else{
           echo "<center><h1>Necesita iniciar sesion</h1></center>";
           header ("refresh:2; url = index.php");
}
?>
Codigo – Lista de Alumnos

<?php
        include("conexion.php");
        $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server");
        mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos
        $tabla = mysql_query("SELECT * FROM Matriculas"); // Selecciona todos los registros de la tabla
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lista de Alunmos</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
 <table width="800" border="0">
  <tr>
    <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td>
  </tr>
  <tr>
 <td align="right"><a href="index.php"><h3>Salir</h3></a></td>
 </tr>
  <tr>
    <td colspan="5">
    &nbsp;
    <center>
 <h2>Lista de Alumnos</h2>
</center>
<form id="MyForm" name="MyForm" method="post" action="">
<table align="Center" border="1" width="750" cellspacing="0" cellpadding="2">
          <tr align="center">
          <td>Id</td>
          <td>Dni</td>
          <td>Apellidos</td>
          <td>Nombres</td>
          <td>Email</td>
         <td>Especialidad </td>
          <td>Turno</td>
         <td>Semestre</td>
          </tr>
<?php
          while ($Registro = mysql_fetch_array($tabla)) {
?>
<tr>
<td>
<?php
         $Id=$Registro['Id'];
         echo "<input type='checkbox' id='chkRegistro' name='chkRegistro' value='$Id'>";
         echo $Registro['Id'];
         ?>
    </td>
<td><?php echo $Registro['Dni'];?></td>
<td><?php echo $Registro['Apellidos'];?></td>
<td><?php echo $Registro['Nombres'];?></td>
    <td><?php echo $Registro['Email'];?></td>
    <td><?php echo $Registro['Especialidad'];?></td>
    <td><?php echo $Registro['Turno'];?></td>
    <td><?php echo $Registro['Semestre'];?></td>
         </tr>
<?php
         } // Fin del bucle de ordenes
         mysql_free_result($tabla); // Libera los registros de la tabla
         mysql_close($conexion); // Cierra la conexion con la base de datos
?>
</table>
<center>
         <p>
           <input type="button" onclick="this.form.action='eliminar.php' ;this.form.submit();"
name="btnEliminar" value="Eliminar" /> &nbsp;&nbsp;&nbsp;
   <input type="button" onclick="this.form.action='consulta.php' ;this.form.submit();"
name="btnActualizar" value="Modificar" /> &nbsp;&nbsp;&nbsp;
           <input type="button" onclick="this.form.action='mostrar.php' ;this.form.submit();"
name="btnInsertar" value="Insertar" />
  </p>
</center>
</form>
   &nbsp;
   </td>
  </tr>
  <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  </tr>
 </table>
</div>
</body>
</html>
Codigo php – Modificar

<?php
        include("conexion.php");
        $Id=$_POST['txtId'];
        $strDni=$_POST['txtDni'];
        $strApellidos=$_POST['txtApellidos'];
        $strNombres=$_POST['txtNombres'];
        $strEmail=$_POST['txtEmail'];
        $strEspecialidad=$_POST['txtEspecialidad'];
        $strTurno=$_POST['txtTurno'];
        $strSemestre=$_POST['txtSemestre'];
        $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server");
        mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos
        if(isset($strDni) && !empty($strDni) &&
           isset($strApellidos) && !empty($strApellidos) &&
           isset($strNombres) && !empty($strNombres) &&
           isset($strEmail) && !empty($strEmail) &&
           isset($strEspecialidad) && !empty($strEspecialidad) &&
           isset($strTurno) && !empty($strTurno) &&
           isset($strSemestre) && !empty($strSemestre))
        {
                   $Sql="UPDATE Matriculas SET Dni='$strDni', Apellidos='$strApellidos',
                   Nombres='$strNombres', Email='$strEmail', Especialidad='$strEspecialidad',
                   Turno='$strTurno', Semestre='$strSemestre' WHERE Id='$Id'";
                   mysql_query($Sql);
                   header ("Location: listado.php");
        }else{
                   echo "<script language='javascript' type='text/javascript'>window.alert('Llene todo los
campos');
                   window.location='listado.php';</script>";
}
?>
Codigo php – Insertar
<?php
        include("conexion.php");

         if(isset($_POST['chkRegistro']))
         {
                           $valor=$_POST['chkRegistro'];
                           $conexion = mysql_connect($host, $user, $password) or die("Problemas con
Server");
                           mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la
base de datos
                           $sql="DELETE FROM Matriculas WHERE Id =$valor";
                           mysql_query($sql);

                          header ("Location:listado.php");
        }else{
                echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un
Registro');
window.location='listado.php';</script>";



Codigo- Modificar

<?php
        if(isset($_POST['chkRegistro']))
{
include("conexion.php");
$conexion = mysql_connect($host, $user, $password) or die("Problemas con Server");
mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos
                  $Id=$_POST['chkRegistro'];
$sql=mysql_query("SELECT * FROM Matriculas WHERE Id=$Id");
$Registro = mysql_fetch_array($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Buscar</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
<table width="800" border="0">
  <tr>
<td colspan="5"><img src="banner.jpg" width="800" height="250"/></td>
 </tr>
<td align="right"><a href="listado.php"><h3>Atras</h3></a></td>
 <tr>
   <td colspan="5">
&nbsp;
   <center>
 <h1> Modificar...?</h1></center>
<form id="form1" name="form1" method="post" action="actualizar.php">
<table width="35%" border="0" cellpadding="2" align="center">
</tr>
<tr>
          <?php echo "<input name='txtId' type='hidden' value='$Registro[0]'>";?>
          </tr>
  <tr>
  <td align="right">Dni</td>
<td><?php echo "<input name='txtDni' type='text' size='30' value='$Registro[1]'>";?></td>
</tr>
<tr>
  <td align="right">Apellidos</td>
  <td><?php echo "<input name='txtApellidos' type='text' size='30' value='$Registro[2]'>";?></td>
</tr>
<tr>
<td align="right">Nombres</td>
    <td><?php echo "<input name='txtNombres' type='text' size='30' value='$Registro[3]'>";?></td>
</tr>

  <tr>
<td align="right">Email</td>
   <td><?php echo "<input name='txtEmail' type='text' size='30' value='$Registro[4]'>";?></td>
         </tr>
<tr>
         <td align="right">Especialidad</td>
     <td><?php echo "<input name='txtEspecialidad' type='text' size='30' value='$Registro[5]'>";?></td>
</tr>
<tr>
<td align="right">Turno</td>
    <td><?php echo "<input name='txtTurno' type='text' size='30' value='$Registro[6]'>";?></td>
         </tr>
  <tr>
         <td align="right">Semestre</td>
    <td><?php echo "<input name='txtSemestre' type='text' size='30' value='$Registro[7]'>";?></td>
</tr>
<tr>
         <td colspan="2" align="center">
         <input type="submit" name="Submit" value="Actualizar" />
         </td>
         </tr>
</table>
</form>
 &nbsp;
  </td>
  </tr>
 <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
</tr>
</table>
</div>
</body>
</html>
<?Php
        }else{
echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un Registro');
                 window.location='listado.php';</script>";
        }?>




Codigo-Insertar

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mostrar</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
 <table width="800" border="0">
  <tr>
    <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td>
  </tr>
  <tr>
 <td align="right"><a href="listado.php"><h3>Atras</h3></a></td>
 </tr>
  <tr>
    <td colspan="5">
     <div align="center">
     &nbsp; &nbsp;
     <table align="center">
<form id="form1" name="form1" method="post" action="insertar.php">
    <tr>
     <td colspan="2"><div align="center"><strong><h2>MATRICULA DEl
ESTUDIANTE</h2></strong></div></td>
    </tr>
    <tr>
     <td><div align="right">Dni:</div></td>
     <td><input name="txtDni" type="text" id="txtDni" size="30" maxlength="8"/></td>
    </tr>
    <tr>
     <td><div align="right">Apellidos:</div></td>
     <td><input name="txtApellidos" type="text" id="txtApellidos" size="50" maxlength="40" /></td>
    </tr>
    <tr>
     <td><div align="right">Nombres:</div></td>
     <td><input name="txtNombres" type="text" id="txtNombres" size="50" maxlength="50" /></td>
    </tr>
    <tr>
     <td><div align="right">Email:</div></td>
     <td><input name="txtEmail" type="text" id="txtEmail" size="40" maxlength="50" /></td>
    </tr>
    <tr>
     <td><div align="right">Especialidad:</div></td>
     <td>
      <select name="cboEspecialidad" id="cboEspecialidad">
         <option value="Computacion e Informatica">Computacion e Informatica</option>
         <option value="Contabilidad">Contabilidad</option>
         <option value="Secretariado">Secretariado</option>
         <option value="Administracion">Administracion</option>
         <option value="Enfemeria">Enfermeria</option>
         <option value="Diseño Grafico">Diseño Grafico</option>
         <option value="Electronica">Electronica</option>
         <option value="Cursos corto">Cursos cortos</option>
       </select>
     </td>
    </tr>
    <tr>
     <td><div align="right">Turno:</div></td>
     <td>
      <select name="cboTurno" id="cboturno">
         <option value="M">Mañana</option>
         <option value="T">Tarde</option>
         <option value="N;">Nocturna</option>
       </select>
     </td>
    </tr>
    <tr>
     <td><div align="right">Semestre:</div></td>
     <td>
      <select name="cboSemestre" id="cboSemestre">
<option value="1">Semestre 1</option>
         <option value="2">Semestre 2</option>
         <option value="3;">Semestre 3</option>
         <option value="4;">Semestre 4</option>
         <option value="5;">Semestre 5</option>
         <option value="6;">Semestre 6</option>
       </select>
      </td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
       <p>
        <input type="submit" name="btnEnviar" id="btnEnviar" value="Matricular" /> &nbsp; &nbsp;
&nbsp; &nbsp;
        <input type="reset" name="btnRestablecer" id="btnRestablecer" value="Restablecer" />
       </p>
      </div></td>
    </tr>
         </form>
</table>
   &nbsp;
    </div>
  </tr>
  <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  </tr>
 </table>
</div>
</body>
</html>




Codigo-Buscar
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Busqueda</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
 <table width="800" border="0">
  <tr>
    <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td>
</tr>
<td align="right"><a href="index.php"><h3>Salir</h3></a></td>
    <tr>
    <td colspan="5">
    &nbsp;
    <div align="center">
<form id="form1" name="form1" method="post" action="buscar.php">
 <table width="700">
  <tr>
    <td align="center" colspan=4><h1>Busqueda del Alumno</h1></td></tr>
  <tr><td align="center"><b>Especialidad</li></b>
    </td><td align="center"><b>Turno</li></b>
     </td><td align="center"><b>Semestre</li></b>
      </td><td><b>Dni del Estudiante</li></b>
       </td>
    </tr>
  <tr>
    <td align="center">
     <select name="cboEspecialidad" id="cboEspecialidad">
      <option value="Seleccione Especialidad">Seleccione Especialidad</option>
      <option value="Computacion e Informatica">Computacion e Informatica</option>
      <option value="Contabilidad">Contabilidad</option>
      <option value="Secretariado;">Secretariado</option>
      <option value="Administracion">Administracion</option>
      <option value="Enfemeria">Enfermeria</option>
      <option value="Diseño Grafico">Diseño Grafico</option>
      <option value="Electronica">Electronica</option>
      <option value="Cursos corto">Cursos cortos</option>
      </select></td>

   <td align="center">
    <select name="cboTurno" id="cboturno">
     <option value="Seleccione Turno">Seleccione Turno</option>
     <option value="M">Mañana</option>
     <option value="T">Tarde</option>
     <option value="N">Nocturna</option>
     </select>
    </td><td align="center">
<select name="cboSemestre" id="cboSemestre">
       <option value="Seleccione Semestre">Seleccione Semestre</option>
       <option value="1">Semestre 1</option>
       <option value="2">Semestre 2</option>
       <option value="3">Semestre 3</option>
       <option value="4">Semestre 4</option>
       <option value="5">Semestre 5</option>
       <option value="6">Semestre 6</option>
     </select>
     </td>
   <td>
    <input type="text" name="txtDni" size=25 maxlength=8 />
    </td>
   </tr>
          <tr>
    <td align="center" colspan="4"><br/>
         <input type="submit" name="btnBuscar" value="Buscar" /> &nbsp; &nbsp;
         <input type="reset" name="btnRestablecer" value="Restablecer" />
    </td>
          </tr>
 </table>
</form>
</div>
   &nbsp;
   </td>
  </tr>
  <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  </tr>
 </table>
</div>
</body>
</html>
Codigo-Resultado de la busqueda

<?php
         include("conexion.php");
$conexion = mysql_connect($host, $user, $password) or die("Problemas con Server");
mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos
$Especialidad = $_POST["cboEspecialidad"];
$Turno = $_POST['cboTurno'];
$Semestre = $_POST['cboSemestre'];
$Dni = $_POST['txtDni'];
if($Dni=="" && $Especialidad=="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" &&
$Turno=="Seleccione Turno")
         {
echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un criterio de
busqueda');
                  window.location='ver.php';</script>";
         }
         else
{
if($Dni!="" && ($Especialidad=="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" &&
$Turno=="Seleccione Turno" ) ||
($Especialidad!="Seleccione Especialidad" || $Semestre!="Seleccione Semestre" ||
$Turno!="Seleccione Turno" ))
         {
$query = "SELECT * FROM Matriculas WHERE Dni='$Dni'";// Caso que Dni este lleno
                  }
if($Especialidad!="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" &&
$Turno=="Seleccione Turno" && $Dni=="")
                  {
$query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad'";// Caso que Especialidad
este Seleccionada
                  }
if($Semestre!="Seleccione Semestre" && $Especialidad=="Seleccione Especialidad" &&
$Turno=="Seleccione Turno" && $Dni=="")
                  {
$query = "SELECT * FROM Matriculas WHERE Semestre='$Semestre'";// Caso que Semestre este
Seleccionada
}
if($Turno!="Seleccione Turno" && $Especialidad=="Seleccione Especialidad" &&
$Semestre=="Seleccione Semestre" && $Dni=="")
                  {
$query = "SELECT * FROM Matriculas WHERE Turno='$Turno'";// Caso que Turno este Seleccionada
         }
if($Turno=="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" &&
$Semestre!="Seleccione Semestre" && $Dni=="")
                  {
$query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND
Semestre='$Semestre'";// Especialidad y Semestre
                  }
if($Turno!="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" &&
$Semestre=="Seleccione Semestre" && $Dni=="")
                 {
$query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND Turno='$Turno'";//
Especialidad y Turno
                 }
if($Turno!="Seleccione Turno" && $Especialidad=="Seleccione Especialidad" &&
$Semestre!="Seleccione Semestre" && $Dni=="")
                 {

          $query = "SELECT * FROM Matriculas WHERE Semestre='$Semestre' AND Turno='$Turno'";//
Semestre y Turno
}
if($Turno!="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" &&
$Semestre!="Seleccione Semestre" && $Dni=="")
                  {
$query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND Semestre='$Semestre'
AND Turno='$Turno'";// Especialidad, Semestre y Turno
}
$result = mysql_query($query) or die("ERROR...");
$numero = 0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>buscando</title>
</head>
<body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel">
<div align="center">
<table width="800" border="0">
<tr>
<td colspan="5"><img src="banner.jpg" width="900" height="250"/></td>
</tr>
     <tr>
  <td colspan="5">
    &nbsp;
 <div align="center">
 <h1>Resultado de la Busqueda</h1>
<td align="right"><a href="ver.php"><h3>Atras</h3></a></td>
<table border="1" width="900">
<tr align="center" >
   <td>Id</td>
    <td width="100">Dni</td>
    <td>Apellidos y Nombres</td>
   <td>Email</td>
   <td>Especialidad</td>
   <td>Turno</td>
   <td>Semestre</td>
</tr>
<?Php
 while($row = mysql_fetch_array($result))
{
?>
         <tr>
         <td><?Php echo $row["Id"];?></td>
         <td><?Php echo $row["Dni"]; ?></td>
         <td><?Php echo $row["Apellidos"]." ".$row["Nombres"]; ?></td>

          <td><?Php echo $row["Email"];?></td>
     <td><?Php echo $row["Especialidad"];?></td>
      <td><?Php echo $row["Turno"];?></td>
     <td><?Php echo $row["Semestre"];?></td>
  </tr>
<?Php
    $numero++;
  }
 mysql_free_result($result);
 mysql_close($conexion);
?>
</table>
</div>&nbsp;
</td>
  </tr>
 <tr bgcolor="#003366" >
   <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  </tr>
  </table>
</div>
</body>
</html>
<?Php
}
?>

Más contenido relacionado

La actualidad más candente

PHP & MySql
PHP & MySqlPHP & MySql
PHP & MySqlJersonXP
 
Procesar estado
Procesar estadoProcesar estado
Procesar estadoLismirabal
 
Consultar estado
Consultar estadoConsultar estado
Consultar estadoLismirabal
 
tutorial de slide.com
tutorial de slide.comtutorial de slide.com
tutorial de slide.comoctabio
 
Cloud Computing: las nuevas Capas de Persistencia
Cloud Computing: las nuevas Capas de PersistenciaCloud Computing: las nuevas Capas de Persistencia
Cloud Computing: las nuevas Capas de PersistenciaDavid J. Brenes
 
Ejemplos de php_mysql
Ejemplos de php_mysqlEjemplos de php_mysql
Ejemplos de php_mysqlI LG
 
Programa que almacena en una base de datos las características de un carro co...
Programa que almacena en una base de datos las características de un carro co...Programa que almacena en una base de datos las características de un carro co...
Programa que almacena en una base de datos las características de un carro co...jbersosa
 
Etquetas de html
Etquetas de htmlEtquetas de html
Etquetas de htmlaynosk6
 
Asegúr@IT II - Seguridad en Web
Asegúr@IT II - Seguridad en WebAsegúr@IT II - Seguridad en Web
Asegúr@IT II - Seguridad en WebChema Alonso
 
Informe grupal f_arinango_ cuenca
Informe grupal f_arinango_ cuencaInforme grupal f_arinango_ cuenca
Informe grupal f_arinango_ cuencapaulcuenca9
 

La actualidad más candente (17)

PHP & MySql
PHP & MySqlPHP & MySql
PHP & MySql
 
Procesar estado
Procesar estadoProcesar estado
Procesar estado
 
Consultar estado
Consultar estadoConsultar estado
Consultar estado
 
Php2
Php2 Php2
Php2
 
tutorial de slide.com
tutorial de slide.comtutorial de slide.com
tutorial de slide.com
 
Procesar
ProcesarProcesar
Procesar
 
Cloud Computing: las nuevas Capas de Persistencia
Cloud Computing: las nuevas Capas de PersistenciaCloud Computing: las nuevas Capas de Persistencia
Cloud Computing: las nuevas Capas de Persistencia
 
Apuntes php
Apuntes phpApuntes php
Apuntes php
 
Ejemplos de php_mysql
Ejemplos de php_mysqlEjemplos de php_mysql
Ejemplos de php_mysql
 
Programa que almacena en una base de datos las características de un carro co...
Programa que almacena en una base de datos las características de un carro co...Programa que almacena en una base de datos las características de un carro co...
Programa que almacena en una base de datos las características de un carro co...
 
Introducción a DJango
Introducción a DJangoIntroducción a DJango
Introducción a DJango
 
Introducción a Flask
Introducción a FlaskIntroducción a Flask
Introducción a Flask
 
Etquetas de html
Etquetas de htmlEtquetas de html
Etquetas de html
 
Php
PhpPhp
Php
 
Asegúr@IT II - Seguridad en Web
Asegúr@IT II - Seguridad en WebAsegúr@IT II - Seguridad en Web
Asegúr@IT II - Seguridad en Web
 
Fundamentos de CSS
Fundamentos de CSSFundamentos de CSS
Fundamentos de CSS
 
Informe grupal f_arinango_ cuenca
Informe grupal f_arinango_ cuencaInforme grupal f_arinango_ cuenca
Informe grupal f_arinango_ cuenca
 

Destacado

Base Movil Verticals International
Base Movil Verticals InternationalBase Movil Verticals International
Base Movil Verticals InternationalTyWinter
 
Dispositivos moviles y criterios de seleccion
Dispositivos moviles y criterios de seleccionDispositivos moviles y criterios de seleccion
Dispositivos moviles y criterios de seleccionFacultad Ingeniería Udec
 
Documentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizDocumentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizEdderson J. Ortiz
 
PROGRAMACIÓN DE DISPOSITIVOS MÓVILES
PROGRAMACIÓN DE DISPOSITIVOS MÓVILESPROGRAMACIÓN DE DISPOSITIVOS MÓVILES
PROGRAMACIÓN DE DISPOSITIVOS MÓVILESFaber Orozco
 
Must Have Apps for Windows 10
Must Have Apps for Windows 10Must Have Apps for Windows 10
Must Have Apps for Windows 10Wiley
 
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...HubSpot
 

Destacado (9)

Alaindavila
AlaindavilaAlaindavila
Alaindavila
 
Jacqueline nuñez pacco
Jacqueline nuñez paccoJacqueline nuñez pacco
Jacqueline nuñez pacco
 
Base Movil Verticals International
Base Movil Verticals InternationalBase Movil Verticals International
Base Movil Verticals International
 
Dispositivos moviles y criterios de seleccion
Dispositivos moviles y criterios de seleccionDispositivos moviles y criterios de seleccion
Dispositivos moviles y criterios de seleccion
 
Documentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizDocumentacion edderson callpa_ortiz
Documentacion edderson callpa_ortiz
 
PROGRAMACIÓN DE DISPOSITIVOS MÓVILES
PROGRAMACIÓN DE DISPOSITIVOS MÓVILESPROGRAMACIÓN DE DISPOSITIVOS MÓVILES
PROGRAMACIÓN DE DISPOSITIVOS MÓVILES
 
[INFOGRAPHIC] 2015 State of Social Business
[INFOGRAPHIC] 2015 State of Social Business[INFOGRAPHIC] 2015 State of Social Business
[INFOGRAPHIC] 2015 State of Social Business
 
Must Have Apps for Windows 10
Must Have Apps for Windows 10Must Have Apps for Windows 10
Must Have Apps for Windows 10
 
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...
Rethinking Website Design: Creating a Peak-Performing Website with Less Risk ...
 

Similar a Jacqueline nuñez pacco

Php excel
Php excelPhp excel
Php excelpcuseth
 
Anthony saravia documentacion-php
Anthony saravia documentacion-phpAnthony saravia documentacion-php
Anthony saravia documentacion-phpAnthony Saravia
 
Php y my sql con manejo de sesiones
Php y my sql con manejo de sesionesPhp y my sql con manejo de sesiones
Php y my sql con manejo de sesionescapo1988
 
taller administrar bd mysql desde php
taller administrar bd mysql desde phptaller administrar bd mysql desde php
taller administrar bd mysql desde phpEl Progreso
 
Consultar estado
Consultar estadoConsultar estado
Consultar estadoLismirabal
 
DocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlDocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlAntonio
 
Procesar estado
Procesar estadoProcesar estado
Procesar estadoLismirabal
 
Ejemplo de formulario
Ejemplo de formularioEjemplo de formulario
Ejemplo de formularioOVAWEB
 
DocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlDocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlAntonio
 
Base de datos dinamicas
Base de datos dinamicasBase de datos dinamicas
Base de datos dinamicasel_rosales
 
Fe erratas portal
Fe erratas portalFe erratas portal
Fe erratas portalJersonXP
 

Similar a Jacqueline nuñez pacco (20)

Php
PhpPhp
Php
 
Php excel
Php excelPhp excel
Php excel
 
Anthony saravia documentacion-php
Anthony saravia documentacion-phpAnthony saravia documentacion-php
Anthony saravia documentacion-php
 
Php y my sql con manejo de sesiones
Php y my sql con manejo de sesionesPhp y my sql con manejo de sesiones
Php y my sql con manejo de sesiones
 
taller administrar bd mysql desde php
taller administrar bd mysql desde phptaller administrar bd mysql desde php
taller administrar bd mysql desde php
 
Consultar estado
Consultar estadoConsultar estado
Consultar estado
 
DocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlDocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En Xml
 
Loguin
LoguinLoguin
Loguin
 
Reg estado
Reg estadoReg estado
Reg estado
 
Procesar estado
Procesar estadoProcesar estado
Procesar estado
 
Ejemplo de formulario
Ejemplo de formularioEjemplo de formulario
Ejemplo de formulario
 
DocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En XmlDocumentacióN Del Sitio Web En Xml
DocumentacióN Del Sitio Web En Xml
 
Base de datos dinamicas
Base de datos dinamicasBase de datos dinamicas
Base de datos dinamicas
 
Guiapractica de bd completa
Guiapractica de bd completaGuiapractica de bd completa
Guiapractica de bd completa
 
Aprendiendo PHP
Aprendiendo PHPAprendiendo PHP
Aprendiendo PHP
 
Jquery para principianes
Jquery para principianesJquery para principianes
Jquery para principianes
 
J M E R L I N P H P
J M E R L I N P H PJ M E R L I N P H P
J M E R L I N P H P
 
Fe erratas portal
Fe erratas portalFe erratas portal
Fe erratas portal
 
Elemento 3
Elemento 3Elemento 3
Elemento 3
 
PROYECTO_PARTE_3.pdf
PROYECTO_PARTE_3.pdfPROYECTO_PARTE_3.pdf
PROYECTO_PARTE_3.pdf
 

Último

Heinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoHeinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoFundación YOD YOD
 
Introducción:Los objetivos de Desarrollo Sostenible
Introducción:Los objetivos de Desarrollo SostenibleIntroducción:Los objetivos de Desarrollo Sostenible
Introducción:Los objetivos de Desarrollo SostenibleJonathanCovena1
 
RETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxRETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxAna Fernandez
 
codigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinacodigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinavergarakarina022
 
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docxCeciliaGuerreroGonza1
 
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOS
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOSTEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOS
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOSjlorentemartos
 
Plan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPEPlan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPELaura Chacón
 
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxLINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxdanalikcruz2000
 
Informatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosInformatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosCesarFernandez937857
 
Identificación de componentes Hardware del PC
Identificación de componentes Hardware del PCIdentificación de componentes Hardware del PC
Identificación de componentes Hardware del PCCesarFernandez937857
 
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptx
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptxPRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptx
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptxinformacionasapespu
 
Movimientos Precursores de La Independencia en Venezuela
Movimientos Precursores de La Independencia en VenezuelaMovimientos Precursores de La Independencia en Venezuela
Movimientos Precursores de La Independencia en Venezuelacocuyelquemao
 
Historia y técnica del collage en el arte
Historia y técnica del collage en el arteHistoria y técnica del collage en el arte
Historia y técnica del collage en el arteRaquel Martín Contreras
 
Manual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfManual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfMaryRotonda1
 
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdfPlanificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdfDemetrio Ccesa Rayme
 
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIA
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIARAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIA
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIACarlos Campaña Montenegro
 
La Función tecnológica del tutor.pptx
La  Función  tecnológica  del tutor.pptxLa  Función  tecnológica  del tutor.pptx
La Función tecnológica del tutor.pptxJunkotantik
 

Último (20)

Heinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoHeinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativo
 
Power Point: "Defendamos la verdad".pptx
Power Point: "Defendamos la verdad".pptxPower Point: "Defendamos la verdad".pptx
Power Point: "Defendamos la verdad".pptx
 
Introducción:Los objetivos de Desarrollo Sostenible
Introducción:Los objetivos de Desarrollo SostenibleIntroducción:Los objetivos de Desarrollo Sostenible
Introducción:Los objetivos de Desarrollo Sostenible
 
RETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxRETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docx
 
codigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinacodigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karina
 
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx
6° SEM30 WORD PLANEACIÓN PROYECTOS DARUKEL 23-24.docx
 
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOS
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOSTEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOS
TEMA 13 ESPAÑA EN DEMOCRACIA:DISTINTOS GOBIERNOS
 
Repaso Pruebas CRECE PR 2024. Ciencia General
Repaso Pruebas CRECE PR 2024. Ciencia GeneralRepaso Pruebas CRECE PR 2024. Ciencia General
Repaso Pruebas CRECE PR 2024. Ciencia General
 
Plan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPEPlan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPE
 
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxLINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
 
Informatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosInformatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos Básicos
 
Identificación de componentes Hardware del PC
Identificación de componentes Hardware del PCIdentificación de componentes Hardware del PC
Identificación de componentes Hardware del PC
 
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptx
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptxPRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptx
PRIMER SEMESTRE 2024 ASAMBLEA DEPARTAMENTAL.pptx
 
Movimientos Precursores de La Independencia en Venezuela
Movimientos Precursores de La Independencia en VenezuelaMovimientos Precursores de La Independencia en Venezuela
Movimientos Precursores de La Independencia en Venezuela
 
Historia y técnica del collage en el arte
Historia y técnica del collage en el arteHistoria y técnica del collage en el arte
Historia y técnica del collage en el arte
 
Razonamiento Matemático 1. Deta del año 2020
Razonamiento Matemático 1. Deta del año 2020Razonamiento Matemático 1. Deta del año 2020
Razonamiento Matemático 1. Deta del año 2020
 
Manual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfManual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdf
 
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdfPlanificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
 
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIA
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIARAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIA
RAIZ CUADRADA Y CUBICA PARA NIÑOS DE PRIMARIA
 
La Función tecnológica del tutor.pptx
La  Función  tecnológica  del tutor.pptxLa  Función  tecnológica  del tutor.pptx
La Función tecnológica del tutor.pptx
 

Jacqueline nuñez pacco

  • 1. Inicio de la pagina web Direccion URL: http://jacqueline.systemsecret.net Codigo – Conexión <?php $host = "localhost"; $user = "system_user"; $password = "12345*"; $db = "system_colegio"; ?> Codigo – Index <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pagina Principal</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <font face="Monotype Corsiva"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td> </tr> <tr> <tr> <td colspan="5"> &nbsp; <div align="center"> <table width="200" height="150" border="0"> <form action="que desea hacer.php" method="post"> <tr> <td colspan="2"><div align="center"><h1><strong>Iniciar Sesion</strong></h1> </div></td> </tr> <tr> <td width="60%"><div align="right"><strong>Usuario</strong></div></td> <td width="35%"><input type="text" name="txtUsser" id="txtUsser"/></td> </tr> <tr> <td><div align="right"><strong>Contraseña</strong></div></td> <td><input type="password" name="txtPass" id="txtPass" /></td> </tr> <tr> <td colspan="2"><div align="right"> <input type="submit" name="btnEnviar" id="btnEnviar" value="Enviar" /> </div></td> </tr> </form>
  • 2. </table> &nbsp; </div></td> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td> </tr> </table> </div> </body> </html> Usuario: usuario Contraseña:usuario Codigo-Que Desea Hacer <?php include("conexion.php"); session_start(); $_SESSION['Usuario']=$_POST['txtUsser']; $_SESSION['Contraseña']=$_POST['txtPass']; if(isset($_SESSION['Usuario']) && !empty($_SESSION['Usuario']) && isset($_SESSION['Contraseña']) && !empty($_SESSION['Contraseña'])) { $con = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $con) or die("Ploblemas con BD"); $seleccion = mysql_query("SELECT Usuario, Clave FROM Registros WHERE Usuario = '$_POST[txtUsser]'", $con); $sesion = mysql_fetch_array($seleccion); if($_POST['txtPass'] == $sesion['Clave']) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
  • 3. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Que Desea Hacer?</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="leonel"> <center> <table width="800" border="0"> <tr> <td colspan="5"><div align="center"><img src="banner.jpg" width="800" height="250" /></div></td> </tr> <tr> <td colspan="2"><div align="center"> <h2><strong>Que Desea Hacer?</strong></h2></div></td> <td align="right"><a href="index.php"><h3>Salir</h3></a></td> </tr> <tr> <td align="center"><a href="listado.php">Realizar Operacion</a></td> <td align="center"><a href="ver.php">Consultar</a></td> </tr> </table> &nbsp; </div></td> </tr> </tr> </table> </div> </body> </html> <?Php }else{ echo "<h1>Usuario o clave incorecta</h1>"; header ("refresh:2; url = index.php"); } }else{ echo "<center><h1>Necesita iniciar sesion</h1></center>"; header ("refresh:2; url = index.php"); } ?>
  • 4. Codigo – Lista de Alumnos <?php include("conexion.php"); $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos $tabla = mysql_query("SELECT * FROM Matriculas"); // Selecciona todos los registros de la tabla ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Lista de Alunmos</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td> </tr> <tr> <td align="right"><a href="index.php"><h3>Salir</h3></a></td> </tr> <tr> <td colspan="5"> &nbsp; <center> <h2>Lista de Alumnos</h2> </center> <form id="MyForm" name="MyForm" method="post" action=""> <table align="Center" border="1" width="750" cellspacing="0" cellpadding="2"> <tr align="center"> <td>Id</td> <td>Dni</td> <td>Apellidos</td> <td>Nombres</td> <td>Email</td> <td>Especialidad </td> <td>Turno</td> <td>Semestre</td> </tr> <?php while ($Registro = mysql_fetch_array($tabla)) { ?>
  • 5. <tr> <td> <?php $Id=$Registro['Id']; echo "<input type='checkbox' id='chkRegistro' name='chkRegistro' value='$Id'>"; echo $Registro['Id']; ?> </td> <td><?php echo $Registro['Dni'];?></td> <td><?php echo $Registro['Apellidos'];?></td> <td><?php echo $Registro['Nombres'];?></td> <td><?php echo $Registro['Email'];?></td> <td><?php echo $Registro['Especialidad'];?></td> <td><?php echo $Registro['Turno'];?></td> <td><?php echo $Registro['Semestre'];?></td> </tr> <?php } // Fin del bucle de ordenes mysql_free_result($tabla); // Libera los registros de la tabla mysql_close($conexion); // Cierra la conexion con la base de datos ?> </table> <center> <p> <input type="button" onclick="this.form.action='eliminar.php' ;this.form.submit();" name="btnEliminar" value="Eliminar" /> &nbsp;&nbsp;&nbsp; <input type="button" onclick="this.form.action='consulta.php' ;this.form.submit();" name="btnActualizar" value="Modificar" /> &nbsp;&nbsp;&nbsp; <input type="button" onclick="this.form.action='mostrar.php' ;this.form.submit();" name="btnInsertar" value="Insertar" /> </p> </center> </form> &nbsp; </td> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td> </tr> </table> </div> </body> </html>
  • 6. Codigo php – Modificar <?php include("conexion.php"); $Id=$_POST['txtId']; $strDni=$_POST['txtDni']; $strApellidos=$_POST['txtApellidos']; $strNombres=$_POST['txtNombres']; $strEmail=$_POST['txtEmail']; $strEspecialidad=$_POST['txtEspecialidad']; $strTurno=$_POST['txtTurno']; $strSemestre=$_POST['txtSemestre']; $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos if(isset($strDni) && !empty($strDni) && isset($strApellidos) && !empty($strApellidos) && isset($strNombres) && !empty($strNombres) && isset($strEmail) && !empty($strEmail) && isset($strEspecialidad) && !empty($strEspecialidad) && isset($strTurno) && !empty($strTurno) && isset($strSemestre) && !empty($strSemestre)) { $Sql="UPDATE Matriculas SET Dni='$strDni', Apellidos='$strApellidos', Nombres='$strNombres', Email='$strEmail', Especialidad='$strEspecialidad', Turno='$strTurno', Semestre='$strSemestre' WHERE Id='$Id'"; mysql_query($Sql); header ("Location: listado.php"); }else{ echo "<script language='javascript' type='text/javascript'>window.alert('Llene todo los campos'); window.location='listado.php';</script>";
  • 7. } ?> Codigo php – Insertar <?php include("conexion.php"); if(isset($_POST['chkRegistro'])) { $valor=$_POST['chkRegistro']; $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos $sql="DELETE FROM Matriculas WHERE Id =$valor"; mysql_query($sql); header ("Location:listado.php"); }else{ echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un Registro'); window.location='listado.php';</script>"; Codigo- Modificar <?php if(isset($_POST['chkRegistro'])) { include("conexion.php"); $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos $Id=$_POST['chkRegistro']; $sql=mysql_query("SELECT * FROM Matriculas WHERE Id=$Id"); $Registro = mysql_fetch_array($sql); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Buscar</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td> </tr> <td align="right"><a href="listado.php"><h3>Atras</h3></a></td> <tr> <td colspan="5">
  • 8. &nbsp; <center> <h1> Modificar...?</h1></center> <form id="form1" name="form1" method="post" action="actualizar.php"> <table width="35%" border="0" cellpadding="2" align="center"> </tr> <tr> <?php echo "<input name='txtId' type='hidden' value='$Registro[0]'>";?> </tr> <tr> <td align="right">Dni</td> <td><?php echo "<input name='txtDni' type='text' size='30' value='$Registro[1]'>";?></td> </tr> <tr> <td align="right">Apellidos</td> <td><?php echo "<input name='txtApellidos' type='text' size='30' value='$Registro[2]'>";?></td> </tr> <tr> <td align="right">Nombres</td> <td><?php echo "<input name='txtNombres' type='text' size='30' value='$Registro[3]'>";?></td> </tr> <tr> <td align="right">Email</td> <td><?php echo "<input name='txtEmail' type='text' size='30' value='$Registro[4]'>";?></td> </tr> <tr> <td align="right">Especialidad</td> <td><?php echo "<input name='txtEspecialidad' type='text' size='30' value='$Registro[5]'>";?></td> </tr> <tr> <td align="right">Turno</td> <td><?php echo "<input name='txtTurno' type='text' size='30' value='$Registro[6]'>";?></td> </tr> <tr> <td align="right">Semestre</td> <td><?php echo "<input name='txtSemestre' type='text' size='30' value='$Registro[7]'>";?></td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" name="Submit" value="Actualizar" /> </td> </tr> </table> </form> &nbsp; </td> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td>
  • 9. </tr> </table> </div> </body> </html> <?Php }else{ echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un Registro'); window.location='listado.php';</script>"; }?> Codigo-Insertar <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>mostrar</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td> </tr> <tr> <td align="right"><a href="listado.php"><h3>Atras</h3></a></td> </tr> <tr> <td colspan="5"> <div align="center"> &nbsp; &nbsp; <table align="center">
  • 10. <form id="form1" name="form1" method="post" action="insertar.php"> <tr> <td colspan="2"><div align="center"><strong><h2>MATRICULA DEl ESTUDIANTE</h2></strong></div></td> </tr> <tr> <td><div align="right">Dni:</div></td> <td><input name="txtDni" type="text" id="txtDni" size="30" maxlength="8"/></td> </tr> <tr> <td><div align="right">Apellidos:</div></td> <td><input name="txtApellidos" type="text" id="txtApellidos" size="50" maxlength="40" /></td> </tr> <tr> <td><div align="right">Nombres:</div></td> <td><input name="txtNombres" type="text" id="txtNombres" size="50" maxlength="50" /></td> </tr> <tr> <td><div align="right">Email:</div></td> <td><input name="txtEmail" type="text" id="txtEmail" size="40" maxlength="50" /></td> </tr> <tr> <td><div align="right">Especialidad:</div></td> <td> <select name="cboEspecialidad" id="cboEspecialidad"> <option value="Computacion e Informatica">Computacion e Informatica</option> <option value="Contabilidad">Contabilidad</option> <option value="Secretariado">Secretariado</option> <option value="Administracion">Administracion</option> <option value="Enfemeria">Enfermeria</option> <option value="Diseño Grafico">Diseño Grafico</option> <option value="Electronica">Electronica</option> <option value="Cursos corto">Cursos cortos</option> </select> </td> </tr> <tr> <td><div align="right">Turno:</div></td> <td> <select name="cboTurno" id="cboturno"> <option value="M">Mañana</option> <option value="T">Tarde</option> <option value="N;">Nocturna</option> </select> </td> </tr> <tr> <td><div align="right">Semestre:</div></td> <td> <select name="cboSemestre" id="cboSemestre">
  • 11. <option value="1">Semestre 1</option> <option value="2">Semestre 2</option> <option value="3;">Semestre 3</option> <option value="4;">Semestre 4</option> <option value="5;">Semestre 5</option> <option value="6;">Semestre 6</option> </select> </td> </tr> <tr> <td colspan="2"><div align="center"> <p> <input type="submit" name="btnEnviar" id="btnEnviar" value="Matricular" /> &nbsp; &nbsp; &nbsp; &nbsp; <input type="reset" name="btnRestablecer" id="btnRestablecer" value="Restablecer" /> </p> </div></td> </tr> </form> </table> &nbsp; </div> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td> </tr> </table> </div> </body> </html> Codigo-Buscar
  • 12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Busqueda</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="800" height="250"/></td> </tr> <td align="right"><a href="index.php"><h3>Salir</h3></a></td> <tr> <td colspan="5"> &nbsp; <div align="center"> <form id="form1" name="form1" method="post" action="buscar.php"> <table width="700"> <tr> <td align="center" colspan=4><h1>Busqueda del Alumno</h1></td></tr> <tr><td align="center"><b>Especialidad</li></b> </td><td align="center"><b>Turno</li></b> </td><td align="center"><b>Semestre</li></b> </td><td><b>Dni del Estudiante</li></b> </td> </tr> <tr> <td align="center"> <select name="cboEspecialidad" id="cboEspecialidad"> <option value="Seleccione Especialidad">Seleccione Especialidad</option> <option value="Computacion e Informatica">Computacion e Informatica</option> <option value="Contabilidad">Contabilidad</option> <option value="Secretariado;">Secretariado</option> <option value="Administracion">Administracion</option> <option value="Enfemeria">Enfermeria</option> <option value="Diseño Grafico">Diseño Grafico</option> <option value="Electronica">Electronica</option> <option value="Cursos corto">Cursos cortos</option> </select></td> <td align="center"> <select name="cboTurno" id="cboturno"> <option value="Seleccione Turno">Seleccione Turno</option> <option value="M">Mañana</option> <option value="T">Tarde</option> <option value="N">Nocturna</option> </select> </td><td align="center">
  • 13. <select name="cboSemestre" id="cboSemestre"> <option value="Seleccione Semestre">Seleccione Semestre</option> <option value="1">Semestre 1</option> <option value="2">Semestre 2</option> <option value="3">Semestre 3</option> <option value="4">Semestre 4</option> <option value="5">Semestre 5</option> <option value="6">Semestre 6</option> </select> </td> <td> <input type="text" name="txtDni" size=25 maxlength=8 /> </td> </tr> <tr> <td align="center" colspan="4"><br/> <input type="submit" name="btnBuscar" value="Buscar" /> &nbsp; &nbsp; <input type="reset" name="btnRestablecer" value="Restablecer" /> </td> </tr> </table> </form> </div> &nbsp; </td> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td> </tr> </table> </div> </body> </html>
  • 14. Codigo-Resultado de la busqueda <?php include("conexion.php"); $conexion = mysql_connect($host, $user, $password) or die("Problemas con Server"); mysql_select_db($db, $conexion) or die("Ploblemas con BD");// Selecciona la base de datos $Especialidad = $_POST["cboEspecialidad"]; $Turno = $_POST['cboTurno']; $Semestre = $_POST['cboSemestre']; $Dni = $_POST['txtDni']; if($Dni=="" && $Especialidad=="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" && $Turno=="Seleccione Turno") { echo "<script language='javascript' type='text/javascript'>window.alert('Seleccione un criterio de busqueda'); window.location='ver.php';</script>"; } else { if($Dni!="" && ($Especialidad=="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" && $Turno=="Seleccione Turno" ) || ($Especialidad!="Seleccione Especialidad" || $Semestre!="Seleccione Semestre" || $Turno!="Seleccione Turno" )) { $query = "SELECT * FROM Matriculas WHERE Dni='$Dni'";// Caso que Dni este lleno } if($Especialidad!="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" && $Turno=="Seleccione Turno" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad'";// Caso que Especialidad este Seleccionada } if($Semestre!="Seleccione Semestre" && $Especialidad=="Seleccione Especialidad" && $Turno=="Seleccione Turno" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Semestre='$Semestre'";// Caso que Semestre este Seleccionada } if($Turno!="Seleccione Turno" && $Especialidad=="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Turno='$Turno'";// Caso que Turno este Seleccionada } if($Turno=="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" && $Semestre!="Seleccione Semestre" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND Semestre='$Semestre'";// Especialidad y Semestre }
  • 15. if($Turno!="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" && $Semestre=="Seleccione Semestre" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND Turno='$Turno'";// Especialidad y Turno } if($Turno!="Seleccione Turno" && $Especialidad=="Seleccione Especialidad" && $Semestre!="Seleccione Semestre" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Semestre='$Semestre' AND Turno='$Turno'";// Semestre y Turno } if($Turno!="Seleccione Turno" && $Especialidad!="Seleccione Especialidad" && $Semestre!="Seleccione Semestre" && $Dni=="") { $query = "SELECT * FROM Matriculas WHERE Especialidad='$Especialidad' AND Semestre='$Semestre' AND Turno='$Turno'";// Especialidad, Semestre y Turno } $result = mysql_query($query) or die("ERROR..."); $numero = 0; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>buscando</title> </head> <body background="fondo.jpg" link="#isabel" vlink="#jesusj" alink="#leonel"> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><img src="banner.jpg" width="900" height="250"/></td> </tr> <tr> <td colspan="5"> &nbsp; <div align="center"> <h1>Resultado de la Busqueda</h1> <td align="right"><a href="ver.php"><h3>Atras</h3></a></td> <table border="1" width="900"> <tr align="center" > <td>Id</td> <td width="100">Dni</td> <td>Apellidos y Nombres</td> <td>Email</td> <td>Especialidad</td> <td>Turno</td> <td>Semestre</td>
  • 16. </tr> <?Php while($row = mysql_fetch_array($result)) { ?> <tr> <td><?Php echo $row["Id"];?></td> <td><?Php echo $row["Dni"]; ?></td> <td><?Php echo $row["Apellidos"]." ".$row["Nombres"]; ?></td> <td><?Php echo $row["Email"];?></td> <td><?Php echo $row["Especialidad"];?></td> <td><?Php echo $row["Turno"];?></td> <td><?Php echo $row["Semestre"];?></td> </tr> <?Php $numero++; } mysql_free_result($result); mysql_close($conexion); ?> </table> </div>&nbsp; </td> </tr> <tr bgcolor="#003366" > <td colspan="5"><div align="center"><strong><em>2012</em></strong></div></td> </tr> </table> </div> </body> </html> <?Php } ?>