Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/01/2011, 20:22
Avatar de Jessi11
Jessi11
 
Fecha de Ingreso: enero-2011
Mensajes: 29
Antigüedad: 13 años, 4 meses
Puntos: 1
Código de Formulario

Buenas, quería saber si este código php de mi formulario es correcto (el código me lo hizo un amigo), porque al poner "Enviar" no me llega el e-mail que me debería llegar :S.
Si es que el código esta bien, seguro es problema de mi hosting ya que estoy usando uno gratiuto pero igual dice que la opción de mail está activada.
El hosting que uso es este: http://www.000webhost.com (Free Hosting)

Código PHP:
<?php
error_reporting
E_ALL E_NOTICE );
if ( 
$_POST ) {
    
$message 'Nombre: '.$_POST['nombre'].'<br />';
    
$message .= 'Empresa: '.$_POST['empresa'].'<br />';
    
$message .= 'E-mail: '.$_POST['email'].'<br />';
    
$message .= 'Pais: '.$_POST['pais'].'<br />';
    
$message .= 'Mensaje: '.$_POST['mensaje'].'<br />';
    
mail'[email protected]''Web Contact'$message );
}


?>

<!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>
<title> Formulario de Contacto </title>
</head>

<body>


<!-- FORMULARIO -->
<form method="post" action="contacto.php">
  <table>
        <tr>
            <td width="200"><strong>Nombre:</strong></td>
            <td width="313"><input id="nombre" name="nombre" value="" size="55" type="text" /></td>
        </tr>

        <tr>
            <td height="30"><strong>Empresa:</strong></td>
            <td><input id="empresa" name="empresa" value="" size="55" type="text" /></td>
        </tr>

        <tr>
            <td height="30"><strong>E-mail:</strong></td>
            <td><input id="e-mail" name="email" value="" size="55" type="text" /></td>
        </tr>

        <tr>
            <td height="32"><strong>País:</strong></td>
            <td><input id="pais" name="pais" value="" size="55" type="text" /></td>
        </tr>

        <tr>
            <td height="43"><strong>Mensaje:</strong></td>
            <td rowspan="2"><textarea id="mensaje" name="mensaje" cols="50" rows="6"></textarea></td>
        </tr>

        <tr>
            <td></td>
        </tr>
        <tr>
          <td></td>
          <td><input type="submit" style="width:60%" value="Enviar" />
          <br />
  <?php if ( $_POST ) : ?>
Formulario Enviado Correctamente
  <?php endif; ?>
</td>
</tr>
</table>
</form>

</body>
</html>
Muchas Gracias.