INSTITUTO SUPERIOR
        TECNOLOGICO UNITEK – IDAT




     CARRERA PROFESIONAL DE

   COMPUTACIÓN E INFORMÁTICA



      DESARROLLO WEB PHP

Profesor: Pablo Cesar Tito

      Tema: DOCUMENTACION

             PAGINA WEB COLEGIO

               Alumno:

      Quispe Gutiérrez Jhon Elvis

          AREQUIPA – PERÚ

                 2012
Inicio
La pagina principal permite el ingreso solo a usuarios logeados para poder administrar datos
almacenados en la base de datos de el colegio UTP en este caso el usuario es: jhon
Contraseña: jhon.




Menú
Esta pagina es el Menú principal donde escogerás la tarea que deseas ejecutar como
administrar o Consultar (Búsqueda).
Búsqueda




En la busqueda se tiene que ingresar ala informacion guia donde se pueda identificar al
alumno como datos con DNI, SEMESTRE, TURNO, ESPECIALIDAD.




Aquí muestra los datos buscados.
Insertar


Aquí se inserta los datos de los estudiantes llenando los campos requeridos en el sistema.
Actualización
Aquí al seleccionar al alumno puedes modificar la información insertada en la base de datos.




Aquí te muestra un formulario donde puedes modificar campos como Dni, Apellidos, Nombres
Email, Especialidad, Turno, Semestre.
Eliminar
En eliminar se tiene que seleccionar al alumno para poder eliminar de forma permanente
borrando todos los datos insertados.
Conexión
<?php
  $host = "mysql2.000webhost.com";
$user = "a8972962";
  $password = "";
  $db   = "a8972962_colegio";
?>


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>Usuario</title>
</head>
<body bgcolor="#000000" text="orange">
<center>
<div align="center">
<table width="800" border="0">
<tr>
<td colspan="5"><imgsrc="banner.jpg" width="800" height="250"/></td>
</tr>
<form action="menu.php" method="post">

       <table width=80% bgcolor="black" border=0>
<tr>
       <td colspan=2><center>
       <h1>ColegioUtp</h1></center></td>
       </tr>
       <tr align="center">
       <td valign=top align="right"><imgsrc="banner1.jpg" width=200 height=450><td>
<blockquote>
<h1><center>Inicio de Usuario</h1></center>
       <center>

<table border="0" align="center">
<tr>
<td>Usuario:</td><td><label><input type="text" name="txtUsser" id="txtUsser"
autofocus=""/></label></td>
</tr>

<tr>
<td>Password:</td><td><label><input type="password" name="txtPass"
id="txtPass"/></label></td>
</tr>

<tr>
<td><input type="submit" name="btnEnviar" id="btnEnviar" value="Enviar" /></td>
</tr>
</center>
</table>
</table>
<center><imgsrc="inicio.png" width=440></center><br>
</form>
</body>
</html>




Consulta
<?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);
?>
<html>
       <head>
       <title>ActualizarRegistros</title>
</head>

<body text="orange" bgcolor="black">
<table width="800" border="0" align="center">
<tr>
<td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250"
/></div></td>
</tr>
</table>

<center>
<h1>ActualizarMatricula</h1></center>
<form id="form1" name="form1" method="post" action="actualizar.php">
<table width="35%" border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff"
align="center">
       <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>
</body>
</html>
<?Php
        }else{
?>
<script type="text/javascript">
        window.alert("Seleccione un Registro")
</script>
<?Php
                header("refresh:0; url = listado.php");
        }

?>
Menu
<?php
session_start();
include("conexion.php");
if(isset($_POST['txtUsser']) && !empty($_POST['txtUsser']) &&isset($_POST['txtPass'])
&& !empty($_POST['txtPass']))
{
    $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>Menu</title>
</head>

<body bgcolor="black" text="orange">
<center>
<table width="800" border="0">
<tr>
<td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250"
/></div></td>
</tr>

<tr>
        <td colspan="5">&nbsp;
<div align="center">
<table width="200">
<tr>
<td align="center"><imgsrc="loading.ico" />
<ahref="listado.php"><h2>Administrar</h2></a>
                            </td>
<td>&nbsp; &nbsp;</td>

<td align="center">
<imgsrc="info.ico" />
<ahref="ver.php"><h2>Consultar</h2></a></td>

<td>&nbsp; &nbsp;</td>

<td align="center">
<imgsrc="exit.ico" />
<ahref="index.php"><h2>Salir</h2></a></td>

</tr>
</table>
&nbsp;
</div></td>
</tr>
</tr>
</table>
<center><imgsrc="inicio.png" width=440></center><br>
</center>
</body>
</html>
<?Php
}else{
?>
<script type="text/javascript">
        window.alert("Usuario o Clave incorrecta")
</script>
<?Php
        header("Location : index.php");
   }
}else{
?>
<script type="text/javascript">
        window.alert("Llene los campos")
</script>
<?Php
        header("Location : index.php");
}
?>




Insertar
<?php
        include("conexion.php");

        $strDni=$_POST['txtDni'];
        $strApellidos=$_POST['txtApellidos'];
        $strNombres=$_POST['txtNombres'];
        $strEmail=$_POST['txtEmail'];
        $strEspecialidad=$_POST['cboEspecialidad'];
        $strTurno=$_POST['cboTurno'];
        $strSemestre=$_POST['cboSemestre'];

       $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="INSERT INTO Matriculas (Id, Dni, Apellidos, Nombres, Email,
Especialidad, Turno, Semestre)".
               " VALUES (NULL, '$strDni', '$strApellidos', '$strNombres', '$strEmail',
'$strEspecialidad', '$strTurno', '$strSemestre')";
               mysql_query($Sql);
               header ("Location: listado.php");

        }else{
?>
<script type="text/javascript">
        window.alert("Es necesario que llene todos los campos")
</script>
<?Php
               header("refresh:0; url = mostrar.php");
        }

?>




Actualizar
<?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($strTurno) && !empty($strTurno))
        {
                 $Sql="UPDATE MatriculasSET 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 "Es necesario que llene todos los campos";

        }
?>


Buscar
<?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'];

      $tabla = mysql_query("SELECT * FROM Matriculas WHERE Especialidad
=$especialidad "); // Selecciono 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>Ubicacion</title>
</head>
<body bgcolor="black" text="orange">

<table width="800" border="0" align="center">
<tr>
<td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250"
/></div></td>
</tr>
</table>

<div align="center">
<tr>
<td align="center" colspan=4><h1>Resultado</h1></td></tr>
<table border="1" width="700">
<tr align="center">
<td>Id</td>
<tdwidth="100">Dni</td>
<td>Apellidos y Nombres</td>
<td>Email</td>
</tr>
<?php
        while ($Registro = mysql_fetch_array($tabla))
        {
?>
<tr>
        <td><?php echo $Registro['Id'];?></td>
<td><?php echo $Registro['Dni'];?></td>
<td><?php echo $Registro['Apellidos']." ". $Registro['Nombres'];?></td>
<td><?php echo $Registro['Email'];?></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>
</div>
</body>
</html>




Eliminar
<?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
                        mysql_query("DELETE FROM Matriculas WHERE Id =$valor");
                        header ("Location: listado.php");

         }else{
?>
<script type="text/javascript">
         window.alert("Seleccione un Registro")
</script>
<?Php
                header("refresh:0; url = listado.php");
         }

?>
Listado

<?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"); // Selecciono 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>Listado de Alumnos</title>
</head>
<body bgcolor="black" text="orange">
<table width="800" border="0" align="center">
<tr>
<td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250"
/></div></td>
</tr>
</table>

<center>
<h1>Listado de Alumnos</h1>
</center>
<form id="MyForm" name="MyForm" method="post" action="">
<table align="Center" border="1" width="60%" 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='mostrar.php' ;this.form.submit();"
name="btnInsertar" value="Insertar" />&nbsp;&nbsp;&nbsp;

<input type="button" onclick="this.form.action='consulta.php' ;this.form.submit();"
name="btnActualizar" value="Actualizar" />&nbsp;&nbsp;&nbsp;

<input type="button" onclick="this.form.action='eliminar.php' ;this.form.submit();"
name="btnEliminar" value="Eliminar" />
</p>
</center>
</form>
</body>
</html>



Mostrar
<!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>Documento sin título</title>
</head>
<body bgcolor="black" text="orange">
<table width="800" border="0" align="center">
<tr>
<td><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td>
</tr>
</table>
<table align="center">
        <form id="form1" name="form1" method="post" action="insertar.php">
<tr>
<td colspan="2"><div align="center"><strong><h1>MATRICULAS DE
ESTUDIANTES</h1></strong></div><br /></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>
<selectname="cboEspecialidad" id="cboEspecialidad">
<optionvalue="Computacion e Informatica">Computacion e Informatica</option>
<optionvalue="Contabilidad">Contabilidad</option>
<optionvalue="Secretariado">Secretariado</option>
<option value="Administracion">Administracion</option>
<optionvalue="Enfemeria">Enfermeria</option>
<optionvalue="Diseño Grafico">Diseño Grafico</option>
<option value="Electronica">Electronica</option>
<optionvalue="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" />
</div></td>
</tr>

        </form>
</table>
</body>
</html>



Ver

<html>
<head>
<title>Consulta</title>
</head>
<body text="orange" bgcolor="black">
<table width="800" border="0" align="center">
<tr>
<td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250"
/></div></td>
</tr>
</table>
<center>
<form id="form1" name="form1" method="post" action="buscar.php">
<div align="center">
<table width="700">
<tr>
<tdalign="center" colspan=4><h1>Busqueda de Estudiantes</h1></td></tr>
<tr><tdalign="center"><b>Especialidad</li></b>
</td><tdalign="center"><b>Turno</li></b>
</td><tdalign="center"><b>Semestre</li></b>
</td><td><b>Dni del Estudiante</li></b>
</td>
</tr>
<tr>
<td align="center">
<selectname="cboEspecialidad" id="cboEspecialidad">
<optionvalue="Computacion e Informatica">Computacion e Informatica</option>
<optionvalue="Contabilidad">Contabilidad</option>
<optionvalue="Secretariado;">Secretariado</option>
<option value="Administracion">Administracion</option>
<optionvalue="Enfemeria">Enfermeria</option>
<optionvalue="Diseño Grafico">Diseño Grafico</option>
<option value="Electronica">Electronica</option>
<optionvalue="Cursos corto">Cursos cortos</option>
</select></td>

<td align="center">
<select name="cboTurno" id="cboturno">
<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="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"
/></td>
        </tr>
</table>
</div>
</body>
</html>

Más contenido relacionado

PDF
Jacqueline nuñez pacco
PDF
Documentacion
DOCX
Julissa huaman hilari
DOCX
Gonzalo lopez miranda
PDF
Guia N5 Proyectos Web Consultas Php Y My Sql
DOCX
Php excel
RTF
Wp config.php
PDF
Procesar estado
Jacqueline nuñez pacco
Documentacion
Julissa huaman hilari
Gonzalo lopez miranda
Guia N5 Proyectos Web Consultas Php Y My Sql
Php excel
Wp config.php
Procesar estado

La actualidad más candente (10)

DOCX
Procesar estado
PDF
Procesar estado
PDF
Jquery para principianes
PDF
Conferencia 3: solrconfig.xml
PDF
Conferencia 2: El esquema
PDF
Ejemplo de formulario
PDF
Form s
DOCX
Julissarodriguezvilca
PPT
Tm13 introduccion al_sql
Procesar estado
Procesar estado
Jquery para principianes
Conferencia 3: solrconfig.xml
Conferencia 2: El esquema
Ejemplo de formulario
Form s
Julissarodriguezvilca
Tm13 introduccion al_sql
Publicidad

Destacado (20)

PDF
Transitividade verbal objet direto e objeto indireto
PPT
PPS
Convocatorias Corporativas Efectivas
PPSX
Helenerentzako ipuina
PPTX
PDF
Fabbricati rurali: a fi ne giugno scade il termine per la variazione catastale
PPS
São Paulo - SP
PPTX
CNASI 2011
PPTX
PPTX
PPS
83096 37410-corazon-1
PPT
Normandie´s Baby Clothing Collection FW 12/13
PPS
Eu e o_meu_papa
PPT
Ejercicio 3 Francisco SáNchez Silos
PPT
Movimientos
PDF
Érezd jól magad III blokk 1. Minden amit tudni szeretnél
PPT
ทบทวนการประเมินรอบสอง
PDF
CFC Planning
PDF
2010WebPlanning
Transitividade verbal objet direto e objeto indireto
Convocatorias Corporativas Efectivas
Helenerentzako ipuina
Fabbricati rurali: a fi ne giugno scade il termine per la variazione catastale
São Paulo - SP
CNASI 2011
83096 37410-corazon-1
Normandie´s Baby Clothing Collection FW 12/13
Eu e o_meu_papa
Ejercicio 3 Francisco SáNchez Silos
Movimientos
Érezd jól magad III blokk 1. Minden amit tudni szeretnél
ทบทวนการประเมินรอบสอง
CFC Planning
2010WebPlanning
Publicidad

Similar a Documentacion jhon elvis_quispe_gutierrez (20)

PDF
Jacqueline nuñez pacco
DOCX
DOC
PHP - MYSQL
DOCX
Paricia padilla pasos_del_sitio
PDF
Afu3 gb manual de manipulación de datos
PDF
Hi 07-programa de php que registra datos en my sql
PDF
Inf 19 (consulya y borrado de datos)
DOCX
PPT
Base de datos dinamicas
DOCX
Manual edgar
PDF
taller administrar bd mysql desde php
PPT
Codigo que conecta php con mysql
PDF
Pl 08-aplicacion-en-php-my sql
PDF
Manual edgar
PPT
Conexion Entre Php Y Mysqul
PDF
Manipulación de datos
DOCX
Manual final francisco
DOCX
DOCX
Anthony saravia documentacion-php
Jacqueline nuñez pacco
PHP - MYSQL
Paricia padilla pasos_del_sitio
Afu3 gb manual de manipulación de datos
Hi 07-programa de php que registra datos en my sql
Inf 19 (consulya y borrado de datos)
Base de datos dinamicas
Manual edgar
taller administrar bd mysql desde php
Codigo que conecta php con mysql
Pl 08-aplicacion-en-php-my sql
Manual edgar
Conexion Entre Php Y Mysqul
Manipulación de datos
Manual final francisco
Anthony saravia documentacion-php

Último (20)

PPTX
Reconocimiento-Automatico-de-Placas-Vehiculares-con-IA.pptx
PPTX
Presentación final ingenieria de metodos
PPTX
Control de calidad en productos de frutas
PPTX
Procesamiento-del-Lenguaje-Natural-Un-Viaje-Paso-a-Paso.pptx
DOCX
tablas tecnologia maryuri vega 1....docx
PPTX
Circuito de LED en paralelo mediante Switch
PPT
Protocolos de seguridad y mecanismos encriptación
PDF
Inteligencia_Artificial,_Informática_Básica,_22_06_2025_SO_2.pdf
PDF
Distribucion de frecuencia exel (1).pdf
PDF
Teoría de estadística descriptiva y aplicaciones .pdf
DOCX
Informee_APA_Microbittrabajoogrupal.docx
PPTX
CLASE PRACTICA-- SESION 6 -- FPW -- 04 11 23.pptx
PDF
Taller tecnológico Michelle lobo Velasquez
DOCX
Guía 5. Test de orientación Vocacional 2[1] (Recuperado automáticamente).docx
PPTX
TECNOLOGIA EDUCATIVA...........pptx.....
PPTX
Sistema de Gestión Integral TCA Ingenieros.pptx
DOCX
Trabajo informatica joel torres 10-.....................
PPTX
Diapositivas Borrador Rocha Jauregui David Paolo (3).pptx
PPTX
Navegación en neurocirugías y su implicación ética.pptx
PPTX
Uso responsable de la tecnología - EEST N°1
Reconocimiento-Automatico-de-Placas-Vehiculares-con-IA.pptx
Presentación final ingenieria de metodos
Control de calidad en productos de frutas
Procesamiento-del-Lenguaje-Natural-Un-Viaje-Paso-a-Paso.pptx
tablas tecnologia maryuri vega 1....docx
Circuito de LED en paralelo mediante Switch
Protocolos de seguridad y mecanismos encriptación
Inteligencia_Artificial,_Informática_Básica,_22_06_2025_SO_2.pdf
Distribucion de frecuencia exel (1).pdf
Teoría de estadística descriptiva y aplicaciones .pdf
Informee_APA_Microbittrabajoogrupal.docx
CLASE PRACTICA-- SESION 6 -- FPW -- 04 11 23.pptx
Taller tecnológico Michelle lobo Velasquez
Guía 5. Test de orientación Vocacional 2[1] (Recuperado automáticamente).docx
TECNOLOGIA EDUCATIVA...........pptx.....
Sistema de Gestión Integral TCA Ingenieros.pptx
Trabajo informatica joel torres 10-.....................
Diapositivas Borrador Rocha Jauregui David Paolo (3).pptx
Navegación en neurocirugías y su implicación ética.pptx
Uso responsable de la tecnología - EEST N°1

Documentacion jhon elvis_quispe_gutierrez

  • 1. INSTITUTO SUPERIOR TECNOLOGICO UNITEK – IDAT CARRERA PROFESIONAL DE COMPUTACIÓN E INFORMÁTICA DESARROLLO WEB PHP Profesor: Pablo Cesar Tito Tema: DOCUMENTACION PAGINA WEB COLEGIO Alumno: Quispe Gutiérrez Jhon Elvis AREQUIPA – PERÚ 2012
  • 2. Inicio La pagina principal permite el ingreso solo a usuarios logeados para poder administrar datos almacenados en la base de datos de el colegio UTP en este caso el usuario es: jhon Contraseña: jhon. Menú Esta pagina es el Menú principal donde escogerás la tarea que deseas ejecutar como administrar o Consultar (Búsqueda).
  • 3. Búsqueda En la busqueda se tiene que ingresar ala informacion guia donde se pueda identificar al alumno como datos con DNI, SEMESTRE, TURNO, ESPECIALIDAD. Aquí muestra los datos buscados.
  • 4. Insertar Aquí se inserta los datos de los estudiantes llenando los campos requeridos en el sistema.
  • 5. Actualización Aquí al seleccionar al alumno puedes modificar la información insertada en la base de datos. Aquí te muestra un formulario donde puedes modificar campos como Dni, Apellidos, Nombres Email, Especialidad, Turno, Semestre.
  • 6. Eliminar En eliminar se tiene que seleccionar al alumno para poder eliminar de forma permanente borrando todos los datos insertados.
  • 7. Conexión <?php $host = "mysql2.000webhost.com"; $user = "a8972962"; $password = ""; $db = "a8972962_colegio"; ?> 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>Usuario</title> </head> <body bgcolor="#000000" text="orange"> <center> <div align="center"> <table width="800" border="0"> <tr> <td colspan="5"><imgsrc="banner.jpg" width="800" height="250"/></td> </tr> <form action="menu.php" method="post"> <table width=80% bgcolor="black" border=0> <tr> <td colspan=2><center> <h1>ColegioUtp</h1></center></td> </tr> <tr align="center"> <td valign=top align="right"><imgsrc="banner1.jpg" width=200 height=450><td> <blockquote> <h1><center>Inicio de Usuario</h1></center> <center> <table border="0" align="center"> <tr> <td>Usuario:</td><td><label><input type="text" name="txtUsser" id="txtUsser" autofocus=""/></label></td> </tr> <tr> <td>Password:</td><td><label><input type="password" name="txtPass" id="txtPass"/></label></td> </tr> <tr>
  • 8. <td><input type="submit" name="btnEnviar" id="btnEnviar" value="Enviar" /></td> </tr> </center> </table> </table> <center><imgsrc="inicio.png" width=440></center><br> </form> </body> </html> Consulta <?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); ?> <html> <head> <title>ActualizarRegistros</title> </head> <body text="orange" bgcolor="black"> <table width="800" border="0" align="center"> <tr> <td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr> </table> <center> <h1>ActualizarMatricula</h1></center> <form id="form1" name="form1" method="post" action="actualizar.php"> <table width="35%" border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff" align="center"> <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>
  • 9. <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> </body> </html> <?Php }else{ ?> <script type="text/javascript"> window.alert("Seleccione un Registro") </script> <?Php header("refresh:0; url = listado.php"); } ?>
  • 10. Menu <?php session_start(); include("conexion.php"); if(isset($_POST['txtUsser']) && !empty($_POST['txtUsser']) &&isset($_POST['txtPass']) && !empty($_POST['txtPass'])) { $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>Menu</title> </head> <body bgcolor="black" text="orange"> <center> <table width="800" border="0"> <tr> <td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr> <tr> <td colspan="5">&nbsp; <div align="center"> <table width="200"> <tr> <td align="center"><imgsrc="loading.ico" /> <ahref="listado.php"><h2>Administrar</h2></a> </td> <td>&nbsp; &nbsp;</td> <td align="center"> <imgsrc="info.ico" /> <ahref="ver.php"><h2>Consultar</h2></a></td> <td>&nbsp; &nbsp;</td> <td align="center"> <imgsrc="exit.ico" /> <ahref="index.php"><h2>Salir</h2></a></td> </tr> </table>
  • 11. &nbsp; </div></td> </tr> </tr> </table> <center><imgsrc="inicio.png" width=440></center><br> </center> </body> </html> <?Php }else{ ?> <script type="text/javascript"> window.alert("Usuario o Clave incorrecta") </script> <?Php header("Location : index.php"); } }else{ ?> <script type="text/javascript"> window.alert("Llene los campos") </script> <?Php header("Location : index.php"); } ?> Insertar <?php include("conexion.php"); $strDni=$_POST['txtDni']; $strApellidos=$_POST['txtApellidos']; $strNombres=$_POST['txtNombres']; $strEmail=$_POST['txtEmail']; $strEspecialidad=$_POST['cboEspecialidad']; $strTurno=$_POST['cboTurno']; $strSemestre=$_POST['cboSemestre']; $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) &&
  • 12. isset($strSemestre) && !empty($strSemestre)) { $Sql="INSERT INTO Matriculas (Id, Dni, Apellidos, Nombres, Email, Especialidad, Turno, Semestre)". " VALUES (NULL, '$strDni', '$strApellidos', '$strNombres', '$strEmail', '$strEspecialidad', '$strTurno', '$strSemestre')"; mysql_query($Sql); header ("Location: listado.php"); }else{ ?> <script type="text/javascript"> window.alert("Es necesario que llene todos los campos") </script> <?Php header("refresh:0; url = mostrar.php"); } ?> Actualizar <?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($strTurno) && !empty($strTurno)) { $Sql="UPDATE MatriculasSET Dni='$strDni', Apellidos='$strApellidos', Nombres='$strNombres',
  • 13. Email='$strEmail', Especialidad='$strEspecialidad', Turno='$strTurno', Semestre='$strSemestre' WHERE Id='$Id'"; mysql_query($Sql); header ("Location: listado.php"); }else{ echo "Es necesario que llene todos los campos"; } ?> Buscar <?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']; $tabla = mysql_query("SELECT * FROM Matriculas WHERE Especialidad =$especialidad "); // Selecciono 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>Ubicacion</title> </head> <body bgcolor="black" text="orange"> <table width="800" border="0" align="center"> <tr> <td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr> </table> <div align="center"> <tr> <td align="center" colspan=4><h1>Resultado</h1></td></tr> <table border="1" width="700">
  • 14. <tr align="center"> <td>Id</td> <tdwidth="100">Dni</td> <td>Apellidos y Nombres</td> <td>Email</td> </tr> <?php while ($Registro = mysql_fetch_array($tabla)) { ?> <tr> <td><?php echo $Registro['Id'];?></td> <td><?php echo $Registro['Dni'];?></td> <td><?php echo $Registro['Apellidos']." ". $Registro['Nombres'];?></td> <td><?php echo $Registro['Email'];?></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> </div> </body> </html> Eliminar <?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 mysql_query("DELETE FROM Matriculas WHERE Id =$valor"); header ("Location: listado.php"); }else{ ?> <script type="text/javascript"> window.alert("Seleccione un Registro") </script> <?Php header("refresh:0; url = listado.php"); } ?>
  • 15. Listado <?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"); // Selecciono 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>Listado de Alumnos</title> </head> <body bgcolor="black" text="orange"> <table width="800" border="0" align="center"> <tr> <td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr> </table> <center> <h1>Listado de Alumnos</h1> </center> <form id="MyForm" name="MyForm" method="post" action=""> <table align="Center" border="1" width="60%" 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'];
  • 16. 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='mostrar.php' ;this.form.submit();" name="btnInsertar" value="Insertar" />&nbsp;&nbsp;&nbsp; <input type="button" onclick="this.form.action='consulta.php' ;this.form.submit();" name="btnActualizar" value="Actualizar" />&nbsp;&nbsp;&nbsp; <input type="button" onclick="this.form.action='eliminar.php' ;this.form.submit();" name="btnEliminar" value="Eliminar" /> </p> </center> </form> </body> </html> Mostrar <!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>Documento sin título</title> </head> <body bgcolor="black" text="orange"> <table width="800" border="0" align="center"> <tr> <td><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr>
  • 17. </table> <table align="center"> <form id="form1" name="form1" method="post" action="insertar.php"> <tr> <td colspan="2"><div align="center"><strong><h1>MATRICULAS DE ESTUDIANTES</h1></strong></div><br /></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> <selectname="cboEspecialidad" id="cboEspecialidad"> <optionvalue="Computacion e Informatica">Computacion e Informatica</option> <optionvalue="Contabilidad">Contabilidad</option> <optionvalue="Secretariado">Secretariado</option> <option value="Administracion">Administracion</option> <optionvalue="Enfemeria">Enfermeria</option> <optionvalue="Diseño Grafico">Diseño Grafico</option> <option value="Electronica">Electronica</option> <optionvalue="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>
  • 18. <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" /> </div></td> </tr> </form> </table> </body> </html> Ver <html> <head> <title>Consulta</title> </head> <body text="orange" bgcolor="black"> <table width="800" border="0" align="center"> <tr> <td colspan="5"><div align="center"><imgsrc="banner.jpg" width="800" height="250" /></div></td> </tr> </table> <center> <form id="form1" name="form1" method="post" action="buscar.php"> <div align="center"> <table width="700"> <tr> <tdalign="center" colspan=4><h1>Busqueda de Estudiantes</h1></td></tr> <tr><tdalign="center"><b>Especialidad</li></b> </td><tdalign="center"><b>Turno</li></b> </td><tdalign="center"><b>Semestre</li></b> </td><td><b>Dni del Estudiante</li></b> </td>
  • 19. </tr> <tr> <td align="center"> <selectname="cboEspecialidad" id="cboEspecialidad"> <optionvalue="Computacion e Informatica">Computacion e Informatica</option> <optionvalue="Contabilidad">Contabilidad</option> <optionvalue="Secretariado;">Secretariado</option> <option value="Administracion">Administracion</option> <optionvalue="Enfemeria">Enfermeria</option> <optionvalue="Diseño Grafico">Diseño Grafico</option> <option value="Electronica">Electronica</option> <optionvalue="Cursos corto">Cursos cortos</option> </select></td> <td align="center"> <select name="cboTurno" id="cboturno"> <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="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" /></td> </tr> </table> </div> </body> </html>