• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

asp: having a problem transfering html name and email address to contactform.asp

Having a problem transfering html name and email address to contactform.asp.
I have included the html form, and where it is failing in the contactform.asp. the following  response.write are blank all i get in the return msg. is: test , name and email are blank, i.e. empty

response.write("test: " + request.Form("name") + "  " + request.Form("email"))

something is wrong but where.

<form action="contactform.asp" method="post" enctype="multipart/form-data" name="contactform">

<table width="500" border="0" cellspacing="4" cellpadding="0" id="contactform">
<td width="178">Name</td>
<td width="322" align="left"><input type="text" name="name" id="name" /></td>
<td align="left"><input type="text" name="address" id="address" /></td>
<td align="left"><input type="text" name="city" id="city" /></td>
<td align="left"><input name="state" type="text" id="state" size="10" />
&nbsp;Zip <input name="" type="text" size="4" /> </td>
<td>Email (required)</td>
<td align="left"><input type="text" name="email" id="email" /></td>
<td align="left"><input type="text" name="phone" id="phone" /></td>
<td>Best time to call</td>
<td align="left"><select name="bestTime" id="bestTime" value="Choose one...">
<option>Choose one...</option> 
<td align="left"><textarea id="message" cols="45" rows="5"></textarea></td>
<td align="left">&nbsp;</td>

<td align="left"><input type="submit" name="button" id="button" value="Submit" /> &nbsp;
<input type="reset" name="reset" id="reset" value="Reset" /></td>


Const cdoBasic = 1 'Use basic (clear-text) authentication.
Const cdoSendUsingPort = 2
'cdosys related
Dim iMsg
Dim iConf
Dim Flds
'mail related
Dim strMsg
Dim strTo
Dim strCC
Dim strFrom
Dim strSubject
Dim strTextBody

'==================begin your configuration
'you must have a username and pass word or you will not be able to send
Dim sendusername	: sendusername	= "info@supertechfbs.com"
Dim userpassword	: userpassword	= "xxxxxx"
Dim smtpserver	 : smtpserver	= "mail-09.name-services.com"

'Dim sendusername	: sendusername	= "diane@dianewestdesign.com"
'Dim userpassword	: userpassword	= "xxxxxx"
'Dim smtpserver	 : smtpserver	= "mail-09.name-services.com"
'end your configuration

response.write("test: " + request.Form("name") + "  " + request.Form("email"))

if (len(TRIM(request.Form("name"))) <> 0) and (len(TRIM(request.Form("email"))) <> 0) Then

Open in new window

  • 2
  • 2
1 Solution
In your <Form> tag you are using enctype="multipart/form-data", when user submits the form are they uploading any file, if not please remove that line and try form submit again.

For tag will look like this:

<form action="contactform.asp" method="post" name="contactform">
westdhAuthor Commented:
I remove the enctype="multipart/form-data" tag I did this also before I call expert-tek.
I install this <form action="contactform.asp" method="post" name="contactform">

and I still do not get a response form the html page.
even though it is transfing the page to the contactform.asp I am still not getting a response from name or email ..

also I have an html form (duplicating contact.html) inside the contactform.asp if the contact.html page is not filled out ....It works.
Ok, Try one more thing. Change the form tag to <form action="contactform.asp" method="get" name="contactform">

and on contactform.asp do

response.write("test: " + request("name") + "  " + request("email"))
westdhAuthor Commented:
That did not work either.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now