文件:email.html
<html>
<head>
<title>发信给网管</title>
</head>
<body>
<h2 align="center">网管收信</h2><br>
<hr><br>
<center>
<form action="mail.php">
发件人:<input type="text" name="from" size=25><br>
主题:<input type="text" name="subject" size=20><br>
内容:
<textarea name="content" cols=80 rows=15>你好,站长:</textarea><br>
<input type="submit" value="寄出"> <input type="reset" value="重写"><br>
</form>
</body></html>
文件:mail.php
<?php
if (empty($from) or empty($subject) or empty($content)) {echo "没有完成填写,请<a href=http://www.webjx.com/htmldata/2005-03-05/"email.html">返回</a>";}
$body="[主题] $subjectn";
$body.="[发件人] $fromn";
$body.=$content;
$deal=mail("webmaster@163.com",$subject,$body,"From:$from");
if ($deal) {echo "寄件成功!";}else{echo "寄件失败!!!";}
?>
PHP介绍到此,也差不多了,你是不是感到了PHP的强大,是不是也想加入PHP的行列,就现在吧。要使自己在PHP中飞翔,这点知识还是崐不足的,它只能帮你入门而已。入门之后,就修行在个人了。我的朋友,再见──(^_^)
<html>
<head>
<title>发信给网管</title>
</head>
<body>
<h2 align="center">网管收信</h2><br>
<hr><br>
<center>
<form action="mail.php">
发件人:<input type="text" name="from" size=25><br>
主题:<input type="text" name="subject" size=20><br>
内容:
<textarea name="content" cols=80 rows=15>你好,站长:</textarea><br>
<input type="submit" value="寄出"> <input type="reset" value="重写"><br>
</form>
</body></html>
文件:mail.php
<?php
if (empty($from) or empty($subject) or empty($content)) {echo "没有完成填写,请<a href=http://www.webjx.com/htmldata/2005-03-05/"email.html">返回</a>";}
$body="[主题] $subjectn";
$body.="[发件人] $fromn";
$body.=$content;
$deal=mail("webmaster@163.com",$subject,$body,"From:$from");
if ($deal) {echo "寄件成功!";}else{echo "寄件失败!!!";}
?>
PHP介绍到此,也差不多了,你是不是感到了PHP的强大,是不是也想加入PHP的行列,就现在吧。要使自己在PHP中飞翔,这点知识还是崐不足的,它只能帮你入门而已。入门之后,就修行在个人了。我的朋友,再见──(^_^)
| 对此文章发表了评论 |
