<?php
$textl = 'Emailga xabar yuborish';
include 'head.php';
echo'<div class="phdr">Emailga xabar yuborish</div>';
if (!empty($_POST))
{
$from=$_POST['from'];
$to=$_POST['to'];
$thm=$_POST['thm'];
$matn=$_POST['txt'];
$txt="\n$matn\n-----\nXabar http://mobinet.uz sayti orqali jo`natildi.";
mail($to,$thm,$txt,"From: <$from>\r\nContent-type:text/plain;charset=utf-8");
}
if (isset($_GET['ok']))
{ echo '<div class="menu">Xabar jo`natildi!</div>'; }
else { echo'<div class="menu"><form action="email.php?ok&url='.$url.'" method="post">
<b>
Kimdan:<br/><input name="from" value="" type="text"/><br/>
Kimga:<br/>
<input name="to" value=""/ type="text"><br/>
Mavzu:<br />
<input name="thm" value=""/ type="text"><br/>
Matn:<br />
<textarea name="txt" cols="20" rows="5"></textarea><br />
<input type="submit" value="Jo`natish" />
</b>
</form>'; }
echo'</div>';
include 'foot.php';
?>