Odkaz na web: TU
Kód: Vybrať všetko
<?php
$emailadr = "stefanides4@gmail.com"; //e-mailová adresa
$predmet = $_POST['predmet'];
$email = $_POST['email'];
$spam = $_POST['spam'];
$zprava = $_POST['zprava'];
$send = $_POST['send'];
if ($send){
if (ereg("^[_a-zA-Z0-9\.\-]+@[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$", $_POST["email"])){
if ($predmet!="" and $email!="" and $zprava!="")
mail("$emailadr","$predmet","$zprava","From: $email");
echo "<p><strong>Váš e-mail bol úspešne odoslaný</strong>.</p>";
}
else
{
echo "Správu se nepodarilo odoslať.
Zadali ste email správne?";
}
}
?>
<h2>Kontakt</h2>
<p>
<div style="padding-left: 30px; float: left; width: 300px;">
<b>ICQ:</b> 264778383<br>
<b>Skype:</b> stefanides4<br>
<b>E-mail:</b> stefanides4@gmail.com<br>
</div>
<br><br>
<div style="padding-left: 30px; float: left; width: 300px;">
<form action="" method="post">
<br><br><input name="email" size="24" value="Váš E-mail"><br>
<input name="predmet" size="24" value="Predmet"><br>Text:
<textarea name="zprava" rows="8" cols="40"></textarea><br><br>
<input type="submit" name="send" value="Odoslať">
</form>
</div>
<div style="float: right; width: 150px;">
</div>
</p>