2009-12-29 120 views
0

网页开发非常新颖。如何获取网页输入数据?

在我的网站上,我有帮助页面,如姓名,电子邮件ID,联系电话,评论和提交按钮假设我在帮助页面输入数据,然后按提交按钮意味着输入数据应发送到电子邮件帐户

For Example 

Help Page 

Name - Raja 
Email - [email protected] 
Contact - 98763214 
Comments - Good web page 

Then I pressed Send button means, the above entered data should send to this email account 
[email protected] with the same format. 

需要编写代码帮助或脚本帮助

+2

您将需要在服务器端的一些代码才能工作。你要在什么环境中承载这个/服务器端可能有哪些脚本语言? – 2009-12-29 09:59:06

回答

3

使用FormMail

你应该formmail.pl设置这些变量

@referers = ('yourdomain.com','ip_number'); 

看看this

@recipients = ('^support\@it\.com'); 

看看this

$mailprog = '/usr/lib/sendmail -i -t'; 

这是sendmail的在你的系统的路径。如果你在哪里是你的sendmail的路径是不知道,在您的UNIX提示符下使用以下命令:

which sendmail 

这会告诉你的sendmail是您的系统上。如果它表示无法找到它,请询问您的系统管理员。

配置好formmail.pl后,把它放在cgi-bin文件夹中。

这里是使用formmail.pl一种形式的例子(收件人字段是必需的)

<form name="myform" action="http://yourdomain.com/cgi-bin/test.pl" method="GET"> 
    <input type=hidden name="recipient" value="[email protected]"> 
    <input type=textarea name="mytext"/> 
    <input type="submit" /> 
</form> 

有关如何使用FormMail程式,去here更多信息。

+0

如果您需要其他信息,我可以帮助您:) – 2009-12-31 14:17:12

0

和JørnSchou-Rode一样,你确实需要使用服务器端编程语言来捕获和处理表单数据。这些选项很多 - PHP,ASP,.NET,ColdFusion,Java,Ruby ......这个名单还在继续。以http://en.wikipedia.org/wiki/Server-side_scripting为起点。

我记得从web开发开始,希望做同样的事情,但您现在正进入更高级的开发领域(超越简单的客户端HTML/CSS/JavaScript编码)。