All pastes #491394 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-16 17:05 UTC
rendered paste body
<?php
  
if(($_POST['email'] == '') || ($_POST['nume'] == '') || (is_numeric($_POST['nume'])) || ($_POST['prenume'] == '') || (is_numeric($_POST['prenume'])) || ($_POST['subiect'] == '') || ($_POST['mesaj'] == '')) {
echo 'Completati campurile corect <br>
      Apasati <a href="index.php">aici</a> pentru a va intoarce la pagina principala.'; 
} else {

$catre = 'oriceon@yahoo.com';  // schimbati adresa de email
$data_trimitere = date('d-m-Y H:i:s');

$subiect = $_POST['subiect'];

$mesaj = '
<html>
<head>
<title>Formular de Contact</title>
</head>
<body>
<p><tt>Data trimitere: '.$data_trimitere.' </tt></p>
<table>
<tr>
<td><tt> Nume: '.$_POST['nume'].' </tt></td>
</tr>
<tr>
<td><tt> Prenume: '.$_POST['prenume'].' </tt></td>
</tr>
<tr>
<td><tt> E-Mail: <a href="mailto:'.$_POST['email'].'">'.$_POST['email'].'</a> </tt></td>
</tr>
<tr>
<td><tt> Mesaj: <br><br> '.$_POST['mesaj'].' </tt></td>
</tr>
</table>
</body>
</html>';

$headere  = "MIME-Version: 1.0\r\n";
$headere .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headere .= "From: ".$_POST['nume']." ".$_POST['prenume']."<".$_POST['email'].">\r\n";

mail($catre, $subiect, $mesaj, $headere);

echo 'Mesajul a fost trimis';

}

?>