Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 13th, 2001, 01:52 AM
marcus marcus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Sweden > Halland > Laholm
Posts: 2 marcus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to marcus
Unhappy Problem with ASP :(

Hello!
I don't know if I've come to the right place? But i would be greatful if anyone could help me!

I wan't to write some information from forms to file. and have managed to do that, but when I fill out the form once again, the new information over writes the old information! Is there a way to save the info?

This is the file eith the forms:

<form method="post" action="pg.asp">
First Name: <input type="text" name="fname"><br>
Last Name: <input type="text" name="lname"><br>
<input type="radio" name="jname" value="M">MALE<br>
<input type="submit" value="Send">
</form>

On submit ti will open the page pg.asp

Thanks for filling out the form!
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile("C:/Inetpub/wwwroot/pd/exempel/test.txt", 2)
f.Write(request.form("fname"))
f.write(request.form("lname"))
f.write(request.form("jname"))
f.close()

%>

Is there a way to save the information (all of it) without writing over the old one!

THANKS/
Marcus

Reply With Quote
  #2  
Old September 21st, 2001, 01:54 AM
yoshimitsu yoshimitsu is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Adelaide
Posts: 72 yoshimitsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
What mode are you opening the file in? If you are opening it in the write mode then it will overwrite it but if you open it in the append mode it will add it to the end of the file.
I hope this helps.

Regards,

Yoshi
__________________
thats why i'm easy.....easy like sunday morning!

Reply With Quote
  #3  
Old September 23rd, 2001, 08:31 AM
marcus marcus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Sweden > Halland > Laholm
Posts: 2 marcus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to marcus
Thanks!

I made a database to save the info in
But now I know how to save info in a file too!

/Marcus

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Problem with ASP :(


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway