Example #1
0
				  <input type="text" name="tele"><br>
				  <br><input type="Submit" name="ok" value="Registrar">
			  </form>
					 <form action="inicio.html">
				       <input type="Submit" name="atras" value="Atras">
					   </form>
             <?php 
} else {
    if ($opcion == 2) {
        ?>
			   <p align="center">
				Lista de Contactos  <br><hr>
				<?php 
        require_once 'conexion.php';
        $db = new conexionBD();
        $db->conectar();
        $registros = mysql_query("select * from datos");
        while ($reg = mysql_fetch_array($registros)) {
            echo "ID:  " . $reg['id'] . "<br>";
            echo "Nombre:  " . $reg['nombre'] . "<br>";
            echo "Telefono:  " . $reg['telefono'] . "<br>";
            echo "<br>";
            echo "<hr>";
        }
        $db->cerrar();
        ?>
				</p>
				    <form action="inicio.html">
				       <input type="Submit" name="atras" value="Atras">
			        </form>
		       <?php