mail.php
<?php
error_reporting(0);
ob_start();
$tytul=$_POST['tytul'];
$tytul=$_POST['tytu2'];
$tresc=$_POST['tresc'];
if($tytul=='' | empty($tytul))
{
$msg="Musisz podać email.";
}
if($tytul=='' | empty($tytu2))
{
$msg="Musisz podać tytuł wiadomości.";
}
else if($tresc=='' | empty($tresc))
{
$msg="Musisz podać treść wiadomości.";
}
else if(isset($_COOKIE["ciastko"])==false)
{
$a1=array('<','>','\'','\\\'',''','\"','&');
$a2=array('<','>',''',''',''','"','&');
$tresc=$_POST['tresc'];
$tresc=str_replace($a1,$a2,$tresc);
$tresc=nl2br($tresc);
$tytul=$_POST['tytu1'];
$tytul=str_replace($a1,$a2,$tytu1);
$tytul=nl2br($tytu1);
$tytul=$_POST['tytu2'];
$tytul=str_replace($a1,$a2,$tytu2);
$tytul=nl2br($tytu2);
$wiadomosc = "<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"Content-Language\" content=\"pl\">
</head>
<body>
$tresc
</body>
</html>";
$newLine="\r\n";
$naglowki .= "From: ha4rr9y.pl" . $newLine;
$naglowki .= "Reply-To: <>" . $newLine;
$naglowki .= "TO: ha4rr9y@gmail.com" . $newLine;
$naglowki .= "Content-type: text/html; charset=utf-8" . $newLine;
$naglowki .= "Content-Transfer-Encoding: 8bit" . $newLine;
$naglowki .= "MIME-Version: 1.0" . $newLine;
setcookie("ciastko", "0", time()+300);
mail("ha4rr9y@gmail.pl", "ha4rr9y.pl", $wiadomosc, $naglowki);
$msg="Wiadomość wysłana.";
}
else
{
$msg="Wiadomość można wysyłać co 5 minut.";
}
ob_end_flush();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ha4rr9y.pl - to co mi potrzebne do szczęścia

</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="header">
</div>
<div id="menu">
<ul>
<li><a href="index.html">Start</a></li>
<li><a href="oferta.html">Oferta</a></li>
<li><a href="dl.html">Downloads</a></li>
<li><a href="kontakt.html">Kontakt</a></li>
</ul>
</div>
<div id="content">
<div class="left">
<h2><a>Strona w budowie</a></h2>
Hym co to bedzie tego jeszcze nie wiem, lecz przeż głowe przewija mi sie wiele pomysłów

:).
Na początku zajme sie szatą graficzną potem treścią i usprawnieniami.
<h2><?php echo("$msg");?></h2>
</div>
<div class="right">
<h2>Pierdoły</h2>
<ul>
<li>World Politics</li>
</ul>
</div>
<div style="clear: both;"> </div>
</div>
<div id="bottom"> </div>
<div id="footer">
Designed by <a href="http://ha4rr9y.pl">ha4rr9y</a>
</div>
</div>
</body>
</html>
kontakt.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ha4rr9y.pl - to co mi potrzebne do szczęścia

</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="header">
</div>
<div id="menu">
<ul>
<li><a href="index.html">Start</a></li>
<li><a href="oferta.html">Oferta</a></li>
<li><a href="dl.html">Downloads</a></li>
<li><a href="kontakt.html">Kontakt</a></li>
</ul>
</div>
<div id="content">
<div class="left">
<h2><a>Strona w budowie</a></h2>
Hym co to bedzie tego jeszcze nie wiem, lecz przeż głowe przewija mi sie wiele pomysłów

:).
Na początku zajme sie szatą graficzną potem treścią i usprawnieniami.
<div class="kontakt">
<form method="post" action="mail.php">
Formularz kontaktowy:<br><br>
Twuj e-mail:<br>
<input type="text" name="tytul" class="input_kontakt"><br><br>
Tytuł:<br>
<input type="text" name="tytu2" class="input_kontakt"><br><br>
Treść<br>
<textarea name="tresc" class="text_kontakt"></textarea><br><br>
<div style="text-align:center;"><input type="submit" class="submit_kontakt" value="Wyślij"></div>
</form>
</div>
</div>
<div class="right">
<h2>Pierdoły</h2>
<ul>
<li>World Politics</li>
</ul>
</div>
<div style="clear: both;"> </div>
</div>
<div id="bottom"> </div>
<div id="footer">
Designed by <a href="http://ha4rr9y.pl">ha4rr9y</a>
</div>
</div>
</body>
</html>