473,416 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Need help for creatin enquiry form

Hi to All.
I am Punit Shrivastava.I am working in Asp.As i am new in this technology please help me.
I want to create enquiry form in Asp.
For this i code like this:
Expand|Select|Wrap|Line Numbers
  1. <form name="enquiry" method="post"  action="enquiry.php">
  2.  
  3.         <table width="494" border="0" cellspacing="0" cellpadding="2" height="511">
  4.             <tr>
  5.                 <td colspan="2" align="left" valign="top" height="29">
  6.                 <p align="left"><font face="Verdana" color="#FFFFFF">Fields marked with * are mandatory 
  7.                 </font></td>
  8.             </tr>
  9.             <tr>
  10.                 <td align="left" valign="top" bgcolor="#FFFFFF" height="27">
  11.                 <font face="Verdana" size="2">Title *</font></td>
  12.                 <td align="left" valign="top" bgcolor="#FFFFFF" height="27">
  13. <font face="Verdana" size="3">
  14. <select name="ddlTitle" id ="ddlTitle" size="1" style="border: 1px solid #315D10" tabindex="1">
  15.                 <option value="Mr">Mr</option>
  16.                 <option value="Mrs">Mrs</option>
  17.                 <option value="Ms">Ms</option>
  18.                 <option value="Miss">Miss</option>
  19.                 <option value="Dr">Dr</option>
  20.                 </select></font></td>
  21.             </tr>
  22.             <tr>
  23.                 <td align="left" valign="top" bgcolor="#FFFFFF" height="25">
  24.                 <font face="Verdana" size="2"><label for="firstname">First Name *</label></font></td>
  25.                 <td align="left" valign="top" bgcolor="#FFFFFF" height="25">
  26.                 <font face="Verdana"><font face="Verdana" size="3">
  27.                 <input type="text" name="txtFirstName" id ="txtFirstName" size="25" maxlength="30" style="border: 1px solid #315D10" tabindex="2"></font><font size="2">
  28.                 </font></font>
  29.                           </td>
  30.             </tr>
  31.             <tr>
  32.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  33.                 <font face="Verdana" size="2"><label for="lastname">Last Name *</label></font></td>
  34.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  35.         <font face="Verdana"><font face="Verdana" size="3">
  36.         <input type="text" name="txtLastName" id ="txtLastName" size="25" style="border: 1px solid #315D10" tabindex="3"></font><font size="2">
  37.         </font></font>
  38.                           </td>
  39.             </tr>
  40.             <tr>
  41.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  42.                 <font face="Verdana" size="2"><label for="postaladdress">Postal Address *</label></font></td>
  43.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  44.                 <font face="Verdana"><font face="Verdana" size="3">
  45. <textarea name="txtPostalAddress" id ="txtPostalAddress" cols="22" wrap="VIRTUAL" rows="3" style="border: 1px solid #315D10" tabindex="5"></textarea><font size="2">
  46.                 </font></font>
  47.                           </td>
  48.             </tr>
  49.             <tr>
  50.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  51.                 <font face="Verdana" size="2"><label for="town">Town</label></font></td>
  52.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  53. <font face="Verdana" size="3"><input type="text" name="txtTown" size="25" style="border: 1px solid #315D10" tabindex="6"></font></td>
  54.             </tr>
  55.             <tr>
  56.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  57.                 <font face="Verdana" size="2"><label for="pincode">Pin code</label></font></td>
  58.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  59.                 <font size="2" face="Verdana">
  60.                 <input type="text" name="txtPinCode" size="25" style="border: 1px solid #315D10" tabindex="7"></font></font></td>
  61.             </tr>
  62.  
  63.             <tr>
  64.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  65.                 <font face="Verdana" size="2"><label for="country">Country</label></font></td>
  66.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  67.                 <font face="Verdana"><font face="Verdana" size="3">
  68.                 <input type="text" id="country" name="txtCountry" size="25" style="border: 1px solid #315D10" tabindex="8"></font><font size="2">
  69.                 </font></font>
  70.                           </td>
  71.             </tr>
  72.             <tr>
  73.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  74.                 <font face="Verdana" size="2"><label for="telephone">Telephone *</label></font></td>
  75.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  76. <font face="Verdana"><font face="Verdana" size="3">
  77. <input type="text" name="txtTelephone" id ="txtTelephone" size="25" maxlength="14" style="border: 1px solid #315D10" tabindex="9"></font><font size="2">
  78. </font></font>
  79.                           </td>
  80.             </tr>
  81.             <tr>
  82.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  83.                 <font face="Verdana" size="2"><label for="fax">Fax</label></font></td>
  84.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  85.                 <font face="Verdana"><font face="Verdana" size="3">
  86.                 <input type="text" name="txtFax" size="25" style="border: 1px solid #315D10" tabindex="10"></font><font size="2">
  87.                 </font></font>
  88.                           </td>
  89.             </tr>
  90.             <tr>
  91.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  92.                 <font face="Verdana" size="2"><label for="email">E-mail 
  93.                 *</label></font></td>
  94.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  95.                 <font face="Verdana"><font face="Verdana" size="3">
  96.                 <input type="text" name="txtEmail" id ="txtEmail" size="25" style="border: 1px solid #315D10" tabindex="11"></font><font size="2">
  97.                 </font></font>
  98.                           </td>
  99.             </tr>
  100.             <tr>
  101.                 <td align="left" bgcolor="#FFFFFF">
  102.                 <font face="Verdana" size="2"><label for="comments">Your Enquiry</label></font></td>
  103.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  104.                 <font face="Verdana"><font face="Verdana" size="3">
  105.                 <textarea name="txtYourEnquiry" cols="30" rows="8" wrap="VIRTUAL" style="border: 1px solid #315D10" tabindex="12"></textarea></font><font size="2">
  106.                 </font></font>
  107.                          </td>
  108.             </tr>
  109.             <tr>
  110.                 <td bgcolor="#FFFFFF">&nbsp;</td>
  111.                 <td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
  112.             </tr>
  113.             <tr>
  114.                 <td bgcolor="#FFFFFF">&nbsp;</td>
  115.                 <td align="left" valign="top" bgcolor="#FFFFFF">
  116.                 <font face="Verdana"><font face="Verdana" size="3">
  117.                 <input type="submit" name="btnSubmit" value="Submit" style="border:1px solid #315D10; " onclick = "return Validate();"  tabindex="13"></font><font size="2"> &nbsp; &nbsp; &nbsp; &nbsp;
  118.  
  119.  
  120.  
  121.                 </font><font face="Verdana" size="3">
  122.  
  123.  
  124.  
  125.                 <input type="reset" name="btnReset" value="Reset" style="border: 1px solid #315D10" tabindex="14"></font><font size="2">
  126.                 </font></font>
  127.                         </td>
  128.             </tr>
  129.             <tr>
  130.                 <td bgcolor="#FFFFFF">&nbsp;</td>
  131.                 <td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;
  132.                 </td>
  133.             </tr>
  134.         </table>
  135.     </form>

And For enquiry.asp i code like this:
Expand|Select|Wrap|Line Numbers
  1. <% 
  2.  
  3. Title = request.form("ddlTitle")
  4.  
  5. FirstName = request.form("txtFirstName")
  6.  
  7. LastName = request.form("txtLastName")
  8.  
  9. PostalAddress = request.form("txtPostalAddress")
  10.  
  11. Town = request.form("txtTown")
  12.  
  13. PinCode = request.form("txtPinCode")
  14.  
  15. Country = request.form("txtCountry")
  16.  
  17. Telephone = request.form("txtTelephone")
  18.  
  19. Fax = request.form("txtFax")
  20.  
  21. Email = request.form("txtEmail")
  22.  
  23. YourEnquiry = request.form("txtYourEnquiry")
  24.  
  25.  
  26.  
  27. mes= mes & "<b>Title:- </b>" & Title & "<br>"
  28. mes= mes & "<b>First Name:- </b>" & FirstName & "<br>"
  29. mes= mes & "<b>Last Name:- </b>" & LastName & "<br>"
  30. mes= mes & "<b>Postal Address:- </b>" & PostalAddress & "<br>"
  31.  
  32. mes= mes & "<b>Town:- </b>" & Town & "<br>"
  33.  
  34. mes= mes & "<b>Pin Code:- </b>" & PinCode & "<br>"
  35.  
  36. mes= mes & "<b>Country:- </b>" & Country & "<br>"
  37.  
  38. mes= mes & "<b>Telephone :- </b>" & Telephone & "<br>"
  39.  
  40. mes= mes & "<b>Fax :- </b>" & Fax & "<br>"
  41.  
  42. mes= mes & "<b>Email :- </b>" & Email & "<br>"
  43.  
  44. mes= mes & "<b>YourEnquiry:- </b>" & YourEnquiry & "<br>"
  45.  
  46.  
  47.  
  48. dim myMail
  49. Set myMail = Server.CreateObject("CDO.Message")
  50. myMail.Subject= "enquiryform"
  51. myMail.From = email
  52. myMail.To= "maninder@xcelcom.net"
  53. myMail.HTMLBody = mes
  54. On Error Resume Next
  55. myMail.Send
  56. set myMail = nothing
  57. IF Err <> 0 THEN
  58. Response.Redirect"Error.html"
  59. ELSE
  60. Response.Redirect"Success.html"
  61. END IF
  62. %>
but is not working .It is showing error .Please suggest me what I do.As i am new in Asp .Please suggest me what i do.

Thanks & Regards
Punit Shrivastava
Sep 22 '07 #1
2 4426
jhardman
3,406 Expert 2GB
Punit,

What is the error it is giving you?

Jared
Sep 24 '07 #2
briony
1
I am Punit Shrivastava.I am working in Asp.As i am new in this technology please help me.I want to create enquiry form in Asp.
For this i code like this:
[code=html]<form name="enquiry" method="post" action="enquiry.php">[code]
> Okay,.. i didnt actually run-test your code,.. but from the first line .. I say this php statement.. did you mentioned ASP? orr.. php..?

> Secondly, from your enquiry.asp form.. I think the numbering you made will results in error since the script actually read it as a part of the code.. I suggest you remove the numebring on enquiry.asp pages.. see what happen, if you still encounter with error.. then you can paste the error message displayed.. and let us try to assist you base on that.

Happy coding! ;)
Sep 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Hermit Dave | last post by:
Hi, Depending upon their security settings some users can not login due to their machine's Privacy Settings some how blocking the cookie (no privacy policy available)... which is encrypted......
1
by: shalender verma | last post by:
i want to activte my form on pressing some code on any other window e.g i run my vb project then i opened a word document now i want that when i press ctrl+r on word window then i want to...
1
by: tehxd | last post by:
I having a table something like this: startdate | stime | endate | etime | tool 3/3/07 | 8:47 | 3/4/07 | 00:30 | A 3/4/07 | 3:57 | 3/4/07 | 4:30 | B 3/4/07 | 8:21 | ...
8
by: punitshrivastava | last post by:
Hi to All. I am Punit .I am back with new question .Please help me. I want to create one enquiry form in php.for this I code it: form code: <form name="enquiry" method="post" ...
3
by: Tom0 | last post by:
Dear All, I am fairly new to access tho I have a fair bit of experience with VBA in excel. I am wanting (amongst other things!) to design a form with a subform on it to show certain business...
0
by: luvdiamondz | last post by:
I kno this is a lot to ask ffor, but i am desperate at the moment... i was sick for 2 weeks only 2 come back 2 skool and be told that the program is due for 2morrow! i missed all the classes teaching...
1
by: pxp2002 | last post by:
Hi there - My partner and I are new to PHP and were very happy with the enquiry form we created yet it only works sometimes. It was brought to my attention when a prospective client called us after...
0
by: gnawz | last post by:
I have a feedback form code which does email but does not display the correct content. In place of the email address, it displays "+1" And the body message is "1" It works well when I test...
6
KeredDrahcir
by: KeredDrahcir | last post by:
I have an Enquiry Form but when you log onto it for some reason I can't foucs on any of the first three input fields on the first radio buttons. The first field that can be focused on is the Enquiry...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.