Advertisement
m4s73r

cliente.php

Apr 14th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title>URL - Amigable</title>
  4.     <link rel="shortcut icon" href="/miaa.ico" />
  5. </head>
  6. <body>
  7. <center>
  8. <div class="resultado" align="left" style="width:500px;">
  9. <?php
  10.  
  11.     $datos_juan = array(
  12.                         "edad"    => 15,
  13.                         "sexo"    => "masculino",
  14.                         "correo" => "algo@creatic.com"
  15.                       );
  16.                      
  17.     $datos_pedro = array(
  18.                         "edad"    => 34,
  19.                         "sexo"    => "masculino",
  20.                         "correo" => "otro@creatic.com"
  21.                       );
  22.  
  23.     $datos_maria = array(
  24.                         "edad"    => 19,
  25.                         "sexo"    => "femenino",
  26.                         "correo" => "algo_maria@creatic.com"
  27.                       );
  28.  
  29.     $lista_clientes = array(
  30.                             "juan"  => $datos_juan,
  31.                             "pedro" => $datos_pedro,
  32.                             "maria" => $datos_maria
  33.                           );
  34.                          
  35.     if(isset($_GET['name']))
  36.     {
  37.         echo ' <p>Nombre: '.$_GET['name'].'</p>'
  38.              .'<p>Edad:   '.$lista_clientes[$_GET['name']]['edad'].'</p>'
  39.              .'<p>Sexo:   '.$lista_clientes[$_GET['name']]['sexo'].'</p>'
  40.              .'<p>Correo: '.$lista_clientes[$_GET['name']]['correo'].'</p>';
  41.     }
  42.     else
  43.     {
  44.         echo 'No se a seleccionado ningun cliente';
  45.     }
  46. ?>
  47. </div>
  48. </body>
  49. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement