Ver Mensaje Individual
  #20  
Antiguo 13-04-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.042
Reputación: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cuando carga el navegador "prueba.htm", (como lo tengo ahora mismo), ver código fuente:

Código:
<html> <head></head> 
<body>

<ul>
  <form name="frm" method="post" action="send.php">
    <table>       
      <tbody>        
        <tr>
          <td><p>Nombre</p></td>
          <td><input type="text" name="nombre" size="40"></td>
        </tr>
        <tr>
          <td><p>Empresa</p></td>
          <td><input type="text" name="empresa" size="40"></td>
        </tr>
        <tr>
          <td>
               
            <?php
              function getNUM()
              {
                $num = "12345";
                return $num;
              }
              $NUM = getNUM();
              echo $NUM;
            ?>
             <!--     <input type="text" name="elnumero" value="<?php echo $NUM ?>">       -->
        
            <input type="hidden" value="<?php echo $NUM; ?>" name="numerito">
            
          </td>
        </tr>
        <tr>
          <td><input type="submit" name="btenviar" value="Enviar los datos"></td>
        </tr>
      </tbody>  
    </table>
  </form>
</ul>
</body>
</html>
Y estos son los dos ficheritos que tengo, el html y el php:
Código:
<html> <head></head> 
<body>

<ul>
  <form name="frm" method="post" action="send.php">
    <table>       
      <tbody>        
        <tr>
          <td><p>Nombre</p></td>
          <td><input type="text" name="nombre" size="40"></td>
        </tr>
        <tr>
          <td><p>Empresa</p></td>
          <td><input type="text" name="empresa" size="40"></td>
        </tr>
        <tr>
          <td>
               
            <?php
              function getNUM()
              {
                $num = "12345";
                return $num;
              }
              $NUM = getNUM();
              echo $NUM;
            ?>
             <!--     <input type="text" name="elnumero" value="<?php echo $NUM ?>">       -->
        
            <input type="hidden" value="<?php echo $NUM; ?>" name="numerito">
            
          </td>
        </tr>
        <tr>
          <td><input type="submit" name="btenviar" value="Enviar los datos"></td>
        </tr>
      </tbody>  
    </table>
  </form>
</ul>
</body>
</html>
Código PHP:
<?php

$numerito
=$HTTP_GET_VARS["NUM"] ;

if (isset(
$email)):
  
$target="info @ intitec . com";
  
$subject="Solicitud";
  
mail($target,$subject,"Nombre: ".$nombre."\nNumerito: ".$numerito."\nEmpresa: ".$empresa);
endif;
?>

<p>Solicitud enviada...<br></p>
Responder Con Cita