如下:
<?
/******************************************************************************
description: this is a simple script to茶杯猪 nd emails via a html-form
to different urs
date: 1999-02-25
author: amalesh kempf <amalesh@goatrance.de>
create this table
the field “what” is for different categories
create table email_notify (
id int(11) default ‘0’ not null,
what varchar(60) default ‘0’ not null,
name varchar(60) default ‘0’ not null,
email varchar(60) default ‘0’ not null,
timestamp varchar(16),
key (what),
primary ke描写晚霞的优美句子y (id));
to fill this table you might create an inrt form
*******************************************************************************/
// t this values:
$strhost=”localhost”;
$strur=”root”;
$strpassw =””;
$strnder=”you@domain.com”;
if (!$btnndemail)
{
?>
the email will be added automatically with “hello name” in the first line of
the emailbody!<br>
<br>
<form action=”nd_email.php3″ enctype=”application/x-www-form-
urlencoded” method=”post”>
<table>
<tr>
<td>subject</td>
<td><input name=”strsubject” size=”40″></td>
</tr>
<tr>
<td>body</td>
<td><textarea cols=”40″ name=”strbody” rows=”8″
wrap=”physical”><? echo $strbody ?></textarea></td>
</tr>
<tr>
<td>category</td>
<td>
<lect name=”strwhat”>
<?php // add you categories here: ?>
<option value=”party”>party</option>
</lect>
</td>
</tr>
</table>
<input name=”btnndemail” style=”height: 24px; width: 224px”
type=”submit” value=”nde 鱼刺卡喉怎么办email”>
</form>
<?php
}
if (ist($btnndemail))
{echo “nd email<br>”;
// create connection
$intconid = mysql_pconnect($strhost,$strus身边的小事er,$strpassw);
// header
$strheader = “return-path: $strnder\nerrors-to: $strnder\nfrom:
$strnder”;
// sql
$strsql = “lect name,email from email_notify where lca(what) =
‘$strwhat'”;
$intres = mysql_query($strsql,$intconid);
echo “nd email $strbody<br>”;
// fetch array
while($sarow = mysql_fetch_array($intres))
{$stremail = $sarow[“email”];
$strname = $sarow[“name”];
$strbodycomplete = “hello ” . $strname[$i] . “!\n\n” . $strbody;
// email
mail($stremail,$strsubject,$strbodycomplete,$strheader);
// output
echo “nd t呆家家o $strname<br>”;
}
}
?>
本文发布于:2023-04-06 05:22:24,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/80ae77f08c256dfc5b476d899d97b11a.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:通过html表格发电子邮件.doc
本文 PDF 下载地址:通过html表格发电子邮件.pdf
留言与评论(共有 0 条评论) |