473,608 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help for creatin enquiry form

22 New Member
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 4441
jhardman
3,406 Recognized Expert Specialist
Punit,

What is the error it is giving you?

Jared
Sep 24 '07 #2
briony
1 New Member
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
1818
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... what i would like is someone to tell me how to set privacy policy for the cookie.. i know its probably not related to asp.net but googling didnt help much.. even on msdn wasnt helpful much... maybe i was searching with the wrong keywords... any...
1
1146
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 activate my form which is minimized on start bar please give the solution bye
1
1311
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 | 3/4/07 | 9:20 | C Currently I have a form which use to open daily1 form. I have one textbox for enter date and a button to view. Is it possible if I want enter 3/4/07 on the text box
8
28238
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" action="enquiry.php">
3
1303
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 enquiries. The subform to show all of the enquiries (not editable) in a continuous form view with the header field also having text boxes which filter the data (ie searching for Last Name etc). The rest of the form to show all the details (editable) of...
0
1203
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 me how to make a program like this!! i hav 2 do withdrawal, deposit, enquiry.... crap i dnt even kno the rest. plz respond :(
1
1790
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 she submitted an enquiry and hadn't heard anything from us. Sometimes it works and sometimes you hit submit then the 'thank you for contacting us page' appears with 'function.mail' underlined and in blue in the top left hand corner - when this...
0
1418
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 it on localhost. As in
6
2273
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 field which is a text area. In IE the only way I can focus is to click the very start or very end of the fields which does not help users, and I can't get them to focus at all in Firefox, Safari, Opera or Google Chrome. I was able to set the...
0
8063
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8003
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6014
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3962
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4025
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1331
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.