Thread View: dk.edb.internet.webdesign.asp
1 messages
1 total messages
Started by Yoka
Tue, 06 Apr 2004 15:51
Asp f.readline Question
Author: Yoka
Date: Tue, 06 Apr 2004 15:51
Date: Tue, 06 Apr 2004 15:51
112 lines
4739 bytes
4739 bytes
Hi, folks...Im new in the asp community, so this may be some silly
questions :)
I am trying to make a "Tagfinder" (Tag=gamername) So that people can
write their tags upload them and search for others. In the first page
they write their tags in some forms:
__________________________________________________________________________
<form method="post" action="tagfindersikker.asp" id="id31">
Insend dine egne oplysninger.
<table id="id31" border="0"><tr><td>
XBCtag:</td><td>
<input type="text" name="xbcform"></td></tr>
<tr><td>XBLtag:</td><td>
<input type="text" name="xblform"></td></tr><tr><td>
Forumprofile:</td><td>
<input type="text" name="forumform"></td></tr><tr><td>
<input type="submit" value="send" target="3"></tr></td></table>
</div>
</form>
____________________________________________________________________________
in the second page they are asked if the written tags is correct, here
the page gets the tag information from the previous page through a
"Request.Form"
page:
_________________________________________________________________________
<%
If Request.Form("xbcform") = "" And Request.Form("xblform") = "" And
Request.Form("forumform") = "" Then
Response.Write("You have to write at least one tag! <br><br><b><a
href='Tagfinder.asp'>back</a><b>")
Else
Response.Write("<h2> Is this the right informations?<h2>")
Response.Write "Your xbCtag er " & Request.Form ("xbcform") &"<br>"
Response.Write "Your xbLtag er " & Request.Form ("xblform") &"<br>"
Response.Write "Your forumprofile is " & Request.Form ("forumform")
&"<br><br>"
Response.Write "Are you sure that this i right?<br><br><br>"
Response.Write "<a href='tagfinder.asp'>No</a>"
Response.Write "<a href='modtagtagfinder.asp'>Yes</a>"
End If
Response.cookies("tag")("xbcform") = Request.Form ("xbcform")
Response.cookies("tag")("xblform") = Request.Form ("xblform")
Response.cookies("tag")("forumform") = Request.Form ("forumform")
Response.cookies("tag").Expires = date+1
%>
____________________________________________________________________________
As you can se, i store the form informations in a cookie...That's
because i dont know how i can get the form informations in the next
page in other ways?!?!
Please tell me if there is an other way, to get them!!
This is the next page, where i store the informations in a text file
(And retrieves the cookie form info's:
____________________________________________________________________________
Response.Write "Your xbCtag is: " & Request.cookies("tag")("xbcform")&
"<br>"
Response.Write "Your xbLtag is: " & Request.cookies("tag")("xblform")
&"<br>"
Response.Write "Your forumprofile is: er " &
Request.cookies("tag")("forumform")&"<br><br>"
Response.Write "This informations has been stored.<br><br>"
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("/asp/brugere.txt")
Set f = fso.OpenTextFile(filespec,1)
Response.Write(f.Read())
Set f = fso.OpenTextFile(filespec,8)
f.WriteLine " xbCtag= "& Request.cookies("tag")("xbcform") & "<br>"
f.WriteLine " xbLtag= "& Request.cookies("tag")("xblform") & "<br>"
f.WriteLine " forumProfil= "& Request.cookies("tag")("forumform") &
"<br>"
Response.Write "<a href='andretaggers.asp'>Search after tags.</a>"
%>
_________________________________________________________________________
Here, i dont know how to read the LAST line in the text file that has
been opened:
_______________________________________________________________________
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("/asp/brugere.txt")
Set f = fso.OpenTextFile(filespec,1)
Response.Write f.readline
_______________________________________________________________________
Will you please tell me how you can read THE LAST line in the text?
Thank you
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads