2009-12-29 131 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編碼)。