Hello
i have this code:
<?php
if(isset($_POST['submit'])) { $to = "mymail@mail.com";
$subject = "pedido de catálogo";
$nome = $_POST["nome"];
$empresa = $_POST["empresa"];
$morada = $_POST["morada"];
$codigo = $_POST["codigo"];
$pais = $_POST["pais"];
$telefone = $_POST["telefone"];
$fax = $_POST["fax"];
$profissao = $_POST["profissao"];
$email = $_POST["email"];
foreach($_POST['catalogo'] as $value) {
$catalogo .= "$value
";
}
$body = "From: $nome
E-Mail: $email
Empresa: $empresa
Morada: $morada $codigo
Pais: $pais
Telefone: $telefone
Fax: $fax
Profissão: $profissao
$catalogo "; echo "Data has been submitted to $to!";
mail($to, $subject, $body);
//header("Location: msg_enviada.htm");
} else {
echo "blarg!";
} ?>
and this is returning:
From: wertgqwer
E-Mail: er
Empresa: erther
Morada: th erth
Pais: er
Telefone: hwe
Fax: rh
Profissão: hwe
Arrayduravit
effegibi
my question is Why its printing the word “array”?
how to rfix it?