تفضل
كود PHP:
<title>Email</title></head>
<body>
<?
function IsEmailAddress($themail) {
if (ereg( "^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$",$themail, $regs)) {
return true;
}
else {
return false;
}
}
if (!isset($themail))
{
?>
<form
name="emils" action="emails.php" method="post">
<input name="themail" type="text" value="Enter Your Email">
<input type="submit" value="Send">
</form>
<?
}
else
{
if (!IsEmailAddress($themail))
{
echo "<p> عفواً بريد خاطىء </p>";
}else{
$fp=fopen("emails.txt","a+");
fwrite($fp,"$themail\n");
fclose($fp);
?>
<p> شكرا لأضافت اميلك </p>
<?
}
}
?>
</body></html>
وأي خدمة