Solved

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

Posted on 2011-09-09
4
242 Views
Last Modified: 2012-05-12
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">
<tr>
<td width="178">Name</td>
<td width="322" align="left"><input type="text" name="name" id="name" /></td>
</tr>
<tr>
<td>Address</td>
<td align="left"><input type="text" name="address" id="address" /></td>
</tr>
<tr>
<td>City</td>
<td align="left"><input type="text" name="city" id="city" /></td>
</tr>
<tr>
<td>State</td>
<td align="left"><input name="state" type="text" id="state" size="10" />
&nbsp;Zip <input name="" type="text" size="4" /> </td>
</tr>
<tr>
<td>Email (required)</td>
<td align="left"><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td>Phone</td>
<td align="left"><input type="text" name="phone" id="phone" /></td>
</tr>
<tr>
<td>Best time to call</td>
<td align="left"><select name="bestTime" id="bestTime" value="Choose one...">
<option>Choose one...</option> 
<option>Morning</option>
<option>Afternoon</option>
<option>Evening</option>
</select>
</td>
</tr>
<tr>
<td>Message</td>
<td align="left"><textarea id="message" cols="45" rows="5"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">&nbsp;</td>
</tr>

<tr>
<td>&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>
</tr>
</table>
</form>

=============================================

<%
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

0
Comment
Question by:westdh
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:pateljitu
ID: 36513051
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">
0
 

Author Comment

by:westdh
ID: 36513227
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.
0
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36513273
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"))
0
 

Author Comment

by:westdh
ID: 36513349
That did not work either.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Update field in order 21 141
WPF issue with Trigger 2 106
Trouble with References... 5 54
VIDEO DATASOURCE Control Resize issue 2 19
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question