佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1128|回复: 4

关于制作register form/ contact form 的难题

[复制链接]
发表于 21-4-2006 05:27 PM | 显示全部楼层 |阅读模式
恩。。。想请教各位一个问题。。。首先我就做了一个contact form但send不出。


我是用2个file run我的form( contact.htm和send-form.asp),一个就是html page让人填form, summit后就会run 这个send-form.asp。


问题是当我click summit button后,就show这个:







我的asp file是这样的。。。。



<%
If Not Request.Form("CheckMe") = ("Web") Then
Response.write "NO SPAMMERS"
Else

Dim objMailer 'As String
Dim sch 'As String
Dim strBody 'As String
Dim bSendOK 'As Boolean
Dim msg 'As String

Const cdoMailFormatMime = 0
Const cdoMailFormatText = 1
Const cdoBodyFormatHTML = 0
Const cdoBodyFormatText = 1

strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & " Online Feedback Form [http://www.xxxxxxxx.com]" & vbCrLf
strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & "Date: " & Date & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "Name                        : " & Request("Name") & vbCrLf
strBody = strBody & "Address                : " & Request("Address") & vbCrLf
strBody = strBody & "Organization        : " & Request("Organization") & vbCrLf
strBody = strBody & "Phone No.                : " & Request("PhoneNo") & vbCrLf
strBody = strBody & "E-mail                        : " & Request("Email") & vbCrLf
strBody = strBody & "Message                : " & Request("Message") & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "" & vbCrLf
'strBody = strBody & "How you found our web site?" & vbCrLf
'strBody = strBody & "========================================================" & vbCrLf
'strBody = strBody & "Found from                : " & Request("survey") & vbCrLf
'strBody = strBody & "Others        : " & Request("search_engines") & vbCrLf
'strBody = strBody & "" & vbCrLf
'strBody = strBody & "" & vbCrLf
strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & "* This e-mail was sent from http://www.xxxxxxs.com"

Set objMailer = Server.CreateObject("Persits.MailSender")

'If SMTP authentication is required
objMailer.Host = "mail.XXXnet.my"
objMailer.Username = "XX@XXX.net.my"
objMailer.Password = "XXX"


objMailer.FromName = Request.Form("Name")
objMailer.From = Request.Form("Email")
objMailer.AddAddress "XX@XX.com.my", "Client Services"
objMailer.AddBcc "onlineforms@XX.net.my", "Online Forms"
objMailer.Subject = "Online Feedback from www.XXXXX.com"
objMailer.Body = strBody
strReturnUrl = Request.ServerVariables("HTTP_REFERER")

       
        ' Now send it off!
On Error Resume Next
If objMailer.Send Then
End If

        If Err.Number = 0 then
                bSendOK = True
                msg = "Your email is being sent. Pls wait..."

' After send off where do you want to redirect page!
Response.write msg

Else
                msg = "Bad Mail"
Response.write msg
        End If

Set objMailer = Nothing
End If
%>
<script language="JavaScript">
<!--
        var rtn='<%= strReturnUrl %>';
        var err_msg='<%= strErrMsg %>';
       
        alert('Your feedback form has been submitted. Thank you.');
       
        if(rtn!=''){
                if(err_msg!='') alert(err_msg);
               
                document.location.href=rtn;
        }else{
                document.location.href='index.htm';
        }
//-->
</script>




问题会不会是在highlight字眼哪里呢?。。。。那一段我不是很明白。。。

[ 本帖最后由 SR20 于 21-4-2006 05:45 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 21-4-2006 07:09 PM | 显示全部楼层
apache 应该不能用 ASP 吧!!!
回复

使用道具 举报

 楼主| 发表于 26-4-2006 08:45 PM | 显示全部楼层
原帖由 milktin 于 21-4-2006 07:09 PM 发表
apache 应该不能用 ASP 吧!!!

paisei...什么是apache...?
回复

使用道具 举报

发表于 26-4-2006 10:25 PM | 显示全部楼层
用IIS来执行你的ASP CODE。。。
回复

使用道具 举报

发表于 26-4-2006 10:36 PM | 显示全部楼层
用PHP 来写,容易得多
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 10-3-2025 05:38 AM , Processed in 0.199791 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表