|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Form handlers
hi guys,
what script can i try to write options in my form to a file on my server... as in <option>1</option> <option>2</option> <option>3</option> <option>4</option> what do i use to write a file on my server with the selected option? |
|
#2
|
||||
|
||||
|
What's your environment?
Where are you selecting your options? Local PC, online, networked app? What's your language - VB, C, .NET, ASP, PHP? What type of file do you want to write/create/update?
__________________
-
thought-after | my thoughts on web development Get Firefox, the developers browser Budget hosting - recommended [/left] |
|
#3
|
||||
|
||||
|
ill just post the script:
<html> <head> <script language="javascript"> function validate() { if (document.Order.firstname.value.length < 3) { alert("Pleast Enter Your Full First Name."); return false; } if (document.Order.lastname.value.length < 2) { alert("Pleast Enter Your Full Last Name."); return false; } return true; } </script> <title>Outside the Box Web Design</title> <META name="description" content="Outside the Box Web Design. Web Pages Designed and Hosted at Competitive Rates"> <META name="keywords" content="web, web design, web hosting, unlimited, unlimited bandwidth, cgi, cgi scripts, create flash movies, create flash buttons, buy, buy domain name, 30MB, 30MB storage space, 30 MB, 30 MB storage space, 50MB, 50MB storage space, 50 MB, 50 MB storage space, 100MB, 100MB storage space, `100 MB, 100 MB storage space, 150MB, 150MB storage space, 150 MB, 150 MB storage space"> <body bgcolor="#003399"> <body text="#CCCC33"> <body link="#A9A9A9" alink="#A9A9A9" vlink="#A9A9A9"> </head> <body> <div align=center> <map name="map1"> <area href="home.html" alt="" title="Home" shape=rect coords="102,48,202,118"> <area href="aboutus.html" alt="" title="About Us" shape=rect coords="203,48,302,118"> <area href="pricing.html" alt="" title="Pricing" shape=rect coords="303,48,402,118"> <area href="contact.html" alt="" title="Contact or Order" shape=rect coords="403,48,502,118"> <area href="help.html" alt="" title="Help" shape=rect coords="503,48,602,118"> </map> <img src="menu_4.png" alt="" border=0 width=613 height=100 usemap="#map1"><BR> </div> <br> <h2>To order, simply fill out the form below and click on submit</h2> <b><i>N.B. As this company is run manually for security reasons, we will not necessarily respond immediately.</i></b> <hr> <form name="Order" action="#" enctype="text/plain" onSubmit="return validate()"> <p><b>Title: </b><select name="title" size="1"> <option>Please Select</option> <option>Mr</option> <option>Mrs</option> <option>Miss</option> <option>Ms</option> <option>Dr</option> </select> <b>First Name:</b> <input type="text" size="20" name="firstname"> <b>Surname:</b> <input type="text" size="20" name="lastname"> </p><hr> <p><b>Please select what hosting package you would like (leave blank if not applicable):</b><br><br> Basic Package - £35p.a. <input type="radio" value="Basic Package" name="packages"><br> Premium Package - £50p.a. <input type="radio" value="Premium Package" name="packages"><br> Deluxe Package - £125p.a. <input type="radio" value="Deluxe Package" name="packages"><br> Business Package - £160p.a. <input type="radio" value="Business Package" name="packages"> </p> <hr> <p><b>If you want any extras, please tick the box that applies and enter the quantity (if applicable):</b><br><br> Flash Movies - from £10 each (please send email with what you want in the movie) <input type="checkbox"><select name="movie" size="1"> <option>Please Select a Quantity</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select><br> Flash Buttons - from £2.50 each (please send email with what you want in the movie) <input type="checkbox"><select name="buttons" size="1"> <option>Please Select a Quantity</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select><br> Allowing CGI Scripts - £50p.a. <input type="checkbox"><br> Graphics - 10 for £20 or £2.50 each. Single Graphics: <input type="radio" name="Graphics"><select name="graphic" size="1"> <option>Please Select a Quantity</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select> Batch of 10 graphics: <input type="radio" name="Graphics"><br> Extra 50mb of Storage - £25.00p.a. <input type="checkbox"><br> Extra 100mb of Storage - £45.00p.a. <input type="checkbox"><br> Extra e-mail address (user@domainname.com)[subject to availability] - £5.00 each p.a. <input type="checkbox"><select name="email" size="1"> <option>Please Select a Quantity</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select> <br><br><hr> <p>Please E-Mail us on <a href="mailto tbwebdesign@gmail.com">OTBWebDesign@gmail.com</a> if you are interested in our web design services and we will email you back as soon as possible.<p><input type="submit" value="Submit"><input type="reset" value="Reset"> </p> </form> <hr><hr> Copyright Outside the Box Web Design© 2004 </body> </html> if it was written to a text file when you press submit that would be good ![]() |
|
#4
|
||||
|
||||
|
Wouldn't you rather have this data transfered directly to you by email (CDONTS/CDOSYS or other free email app)? And rather than storing in a text file store the data in a database?
Anyway, if you really want to have the data stored in a file on the server then you should research the File System Object. Sample script and tutorials can be found at w3schools , and check out this thread for a code that will create unique, sequentially numbered files on the server. |
|
#5
|
||||
|
||||
|
ok what would i do for an email then
![]() |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Form handlers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|