I´ve employed a P H P form based on a Kirupa´s tutorial which works properly with exception of a inexplainable trouble that has occurred ;
(I´ve pasted php code below ) ;
All the fields of the form are filled , the form is submitted and when the forwarded e-mail message is read two fields are in blank :
$segmento and $nome are the missing information ;
Can someone help me out to solve this problem ?
1-…snippet of html form…
<form method=“POST” action=“php/mailer.php”>
.
.etc
.
.
<input type=“text” name=“nome _solicitante” maxlength=“50” size=“35” style class=“formbg”>
<select name="segmento_de_mercado " size=“1” style class=“formbg”>
<option selected>(selecione)</option>
<option>Indústria</option>
<option>Comércio</option>
<option>outro</option>
</select>
2-…PHP code…
<?php
if(isset($_POST[‘Submit’])) {
$to = "anything@anywhere.net";
$subject = "formulario_de_contato";
$empresa = $_POST['empresa'];
$estado = $_POST['estado'];
$segmento = $_POST['segmento_de_mercado'];
$nome = $_POST['nome _solicitante'];
$cargo = $_POST['cargo'];
$departamento = $_POST['departamento'];
$codigo_area = $_POST['codigo_area'];
$telefone = $_POST['telefone'];
$email = $_POST['email'];
$url = $_POST['url_do_site'];
$mensagem = $_POST['mensagem'];
foreach( (array)$_POST['check'] as $value){
$check_msg .= "Checked: $value
";
}
$body = "Empresa: $empresa
Estado: $estado
Segmento de Mercado : $segmento
Nome do solicitante: $nome
Cargo: $cargo
Departamento: $departamento
Cód. área: $codigo_area
Fone: $telefone
Email: $email
Site: $url
$check_msg
Mensagem: $mensagem
";
header("Location: ../thankyoupage.htm");
mail($to, $subject, $body);
} else {
echo “error_invalid_function”;
}
?>
…