本页主题: 关于表单提交程序 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

Yangshuo
级别: 入门弟子


精华: 0
发帖: 7
威望: 0 点
财富: 726 K币
贡献值: 0 点
注册时间:2007-06-29
最后登录:2007-07-29

 关于表单提交程序

我申请的是 Linux 操作系统虚拟主机。烦请各位指点:用什么程序可实现让网站访客将网页中的预订表单直接发到我邮箱里啊?
顶端 Posted: 2007-07-14 10:00 | [楼 主]
枫岩
我在想念 心已累倦
级别: 总版主


精华: 12
发帖: 25380
威望: 21612 点
财富: 4565 K币
贡献值: 3 点
注册时间:2003-12-28
最后登录:2008-09-24

 

需要用到后台程序,例如PHP之类的
顶端 Posted: 2007-07-18 15:28 | 1 楼
Yangshuo
级别: 入门弟子


精华: 0
发帖: 7
威望: 0 点
财富: 726 K币
贡献值: 0 点
注册时间:2007-06-29
最后登录:2007-07-29

 

我决定用 Linux-form 。
1,不知如何设置其中的文件 server-apply.htm 才能实现对表单中的必填项和选填项的控制。
2,不知如何设置其中的文件 server-apply.txt 才能将表单发到我网站邮箱。
我下面的设置不正确,请帮忙修改:
(1)server-apply.htm 文件:
<html>
<head>
<title>Hotel Reservation Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.size01 {  font-size: 1px}
.size09 {  font-size: 9pt}
.size10 {  font-size: 10pt}
.color01 {  color: #666600}
a:link {  font-size: 9pt; color: #000000; text-decoration: none}
a:hover {  font-size: 9pt; color: #666600; text-decoration: underline}
a:visited {  color: #000000; font-size: 9pt; text-decoration: none}
.color02 {  font-size: 9pt; color: #990033}
-->
</style>
</head>
<body bgcolor="#FFFFFF" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<div align="center"><br>
  <br>
  <br>
  <form name="reg_order" method="POST"
  action="http://www.niceyangshuo.com/cgi-bin/cgiemail/server-apply.txt"  onSubmit="return test(this)">
    <input type="hidden" name="success" value="http://www.niceyangshuo.com/success.htm">
    <input type="hidden" name="required-to" value="root@niceyangshuo.com">
    <input type="hidden" name="subject" value="Hotel Reservation Form">
    <DIV align=center>
<FORM name=reg_order onsubmit="return test(this)" action=http://www.niceyangshuo.com/cgi-bin/cgiemail/server-apply.txt method=post><INPUT type=hidden value=http://www.niceyangshuo.com/success.htm name=success> <INPUT type=hidden value=root@niceyangshuo.com name=required-to> <INPUT type=hidden value="Hotel Reservation Form" name=subject>
<DIV align=left>
<TABLE class=size09 borderColor=#666600 cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>             </FONT><FONT color=#000000><U><FONT face=Arial size=5>Xihe Hotel Reservation Form</FONT></U> </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>  </FONT><FONT face=Arial color=#000000 size=2>One of the guest's full name(same as the passport): </FONT><FONT color=#666600> </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   <INPUT size=25 name=contact> </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      Email address: </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   <INPUT size=25 name=address> </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      Another email address(if you have):</FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   <INPUT size=25 name=tel> </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      How many people altogether in your group?<INPUT style="WIDTH: 101px; HEIGHT: 22px" size=12 name=fax></FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      Arrival Date?<INPUT size=25 name=email></FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   </FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      How many nights will you stay in our hotel?<INPUT style="WIDTH: 101px; HEIGHT: 22px" size=12 name=fax></FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      How many <STRONG>double</STRONG> rooms <STRONG>without view</STRONG> do you want?  </FONT><INPUT maxLength=10 size=10 name="Flight Number"></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      How many <STRONG>double</STRONG> rooms <STRONG>with view</STRONG> do you want? </FONT><INPUT maxLength=10 size=10 name="Flight Number"></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      How many <STRONG>connubial</STRONG> rooms <STRONG>with view</STRONG> do you want?  </FONT><INPUT maxLength=10 size=10 name="Flight Number"></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT face=Arial size=2>      Would you need a <SPAN style="FONT-WEIGHT: bold">taxi pickup</SPAN> from the Guilin Airport (<SPAN style="FONT-WEIGHT: bold">yes</SPAN> or <SPAN style="FONT-WEIGHT: bold">no</SPAN>)?<INPUT style="WIDTH: 59px; HEIGHT: 22px" maxLength=10 size=5 name="Flight Number"></FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20></TD></TR>
<TR>
<TD class=size9 align=left width="73%" height=20><FONT color=#666600>   <FONT face=Arial color=#000000 size=2>Flight Number?</FONT><INPUT size=25 name=member> </FONT></TD></TR>
<TR>
<TD align=left width="73%" height=20></TD></TR>
<TR>
<TD align=left width="73%" height=20><FONT face=Arial size=2>      What time will you arrive at the Guilin airport?  <INPUT maxLength=20 name="Arrival Date"></FONT></TD></TR>
<TR>
<TD align=left width="73%" height=20></TD></TR>
<TR>
<TD align=left width="73%" height=20><FONT face=Arial size=2>      Your special requirements:</FONT></TD></TR>
<TR>
<TD class=size9 align=left width="73%"><FONT color=#666600 size=2></FONT><FONT color=#666600>   </FONT><FONT color=#666600 size=2><TEXTAREA name=note rows=5 cols=35></TEXTAREA> </FONT></TD></TR></TBODY></TABLE></DIV>
<DIV align=left> </DIV>
<DIV align=left>                            <INPUT style="WIDTH: 43px; HEIGHT: 23px" type=submit value=send>  <INPUT style="WIDTH: 41px; HEIGHT: 23px" type=reset size=16 value=reset> </DIV>
<DIV></DIV></FORM>
  <p>
    <script language="JavaScript">
<!--
function test(theform)
{if (theform.contact.value.length<1)
    {alert("Please write down your name!");
     theform.contact.focus( );
     return(false);}
                  if (theform.email.value.length<2|theform.email.value.indexOf("@")==-1|theform.email.value.indexOf(".")==-1)
    {alert("Your right E-mail address please!");
     theform.email.focus( );
     return(false);}
     }
//-->
</script>
  </p>
  <p> </p>
</div>
</body>
</html>

(2)server-apply.txt 文件:
From: root@niceyangshuo.com
To: root@niceyangshuo.com
Reply-to:root@niceyangshuo.com
Subject:Hotel Reservation Form


--------Hotel Reservation Form-----------------------

联系人: [contact]
电子邮箱: [email]
Another email address
How many people
Arrival Date
How many nights will you stay
How many double rooms without view
How many double rooms with view
How many connubial rooms with view
need a taxi pickup
Flight Number
the time of arrival
Your special requirements:

    [note]

大家帮帮忙吧。将感激不尽。
-------------------------------------------
顶端 Posted: 2007-07-18 15:56 | 2 楼
古树
古树出品必出精品!
级别: 论坛版主


精华: 0
发帖: 54
威望: 41 点
财富: 15732 K币
贡献值: 0 点
注册时间:2007-04-02
最后登录:2008-11-07

 

单纯用html是做不到的
可以用PHP的mail函数
http://cn2.php.net/manual/zh/ref.mail.php
顶端 Posted: 2007-07-21 14:52 | 3 楼
phpwind
级别: 入门弟子


精华: 0
发帖: 3
威望: 3 点
财富: 9 K币
贡献值: 0 点
注册时间:2007-08-20
最后登录:2007-08-20

 

过去的方法是action里面填一个邮箱地址,好像是mailto:abc@abc.com
顶端 Posted: 2007-08-20 16:06 | 4 楼
古树
古树出品必出精品!
级别: 论坛版主


精华: 0
发帖: 54
威望: 41 点
财富: 15732 K币
贡献值: 0 点
注册时间:2007-04-02
最后登录:2008-11-07

 

Quote:
引用第4楼phpwind于2007-08-20 16:06发表的  :
过去的方法是action里面填一个邮箱地址,好像是mailto:abc@abc.com

还是调用本地的Outlook。。。
顶端 Posted: 2007-08-21 17:18 | 5 楼
随便侃侃
级别: *


精华: *
发帖: *
威望: * 点
财富: * K币
贡献值: * 点
注册时间:*
最后登录:*

 

楼上的朋友都和专业啊 !
顶端 Posted: 2007-09-03 11:44 | 福建省厦门市电信ADSL 6 楼
帖子浏览记录 版块浏览记录
IECN社区 » XHTML/CSS/Dreamweaver

Time now is:11-20 08:17, Gzip disabled 京ICP备06069722号
Powered by PHPWind v6.3.2 Certificate Code © 2003-08 PHPWind.com Corporation