|
 |
asp_web_howto thread: Guestbook
Message #1 by "Drew, Ron" <RDrew@B...> on Thu, 14 Dec 2000 08:22:31 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C065D0.E9B39FC0
Content-Type: text/plain;
charset="iso-8859-1"
I asked this question a few days ago but I dont think I presented it
correctly based on the answers.
I have a site with a guestbook that I just moved ISP from unix to NT. Have
problems with perl so I want to do the following.
Starting with what I have GUESTBOOK.HTML and ADDGUEST.HTML (the guestbook
itself and a form for updating), addguest.html currently executes a perl
script to update guestbook.html. When guestbook.html is reloaded, bingo the
new entry is shown.
How can I do this with asp without needing a database like access or sql?
Ron Drew
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by "Unterste, Andreas" <unterste@d...> on Thu, 14 Dec 2000 12:22:42 -0600
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C065FA.D958F8D0
Content-Type: text/plain;
charset="iso-8859-1"
You wouldn't need a database, but I'd highly recommend one - it's so much
more flexible and easy to handle to if you read up on some of the ADO stuff.
Nevertheless, this should get you started (the ADDGUEST.HTML would have to
bekome ADDGUEST.ASP)
I'd split my GUESTBOOK.HTML into two files, one with the whole HTML wrapper
around it, the other one as include file (html formatted though) like
guestbookentries.inc
- which makes it also guestbook.asp afterwards. (unless somebody confirms
server side include to work with .HTML ?)
<% 'Appending Entries
'Reading from the Guest
strGuestName = request.form("txtGuestName") 'supposing this
to be valid input fields in Guestbook.html
strGuestEmail = request.form("txtGuestEmail")
Set fso = CreateObject("Scripting.FileSystemObject")
Set TextStream = fso.OpenTextFile("GuestBookEntries.inc")
TextStream.WriteLine ("<p>" & strGuestName & " was here on " &
date() & "<br>")
TextStream.WriteLine ("and left the following email : " &
strGuestEmail & "</p>")
TextStream.Close
Set TextStream = nothing
Set fso = nothing
response.write("Your entry has been added")
'or alternatively, just point again to the guestbook.asp - to have
the record displayed with all others
'response.redirect("GuestBook.asp")
%>
Pretty simple, but you get the idea.
Cheers,
Andreas
Andreas Unterste
-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Thursday, December 14, 2000 14:23
To: ASP Web HowTo
Subject: [asp_web_howto] Guestbook
I asked this question a few days ago but I dont think I presented it
correctly based on the answers.
I have a site with a guestbook that I just moved ISP from unix to NT. Have
problems with perl so I want to do the following.
Starting with what I have GUESTBOOK.HTML and ADDGUEST.HTML (the guestbook
itself and a form for updating), addguest.html currently executes a perl
script to update guestbook.html. When guestbook.html is reloaded, bingo the
new entry is shown.
How can I do this with asp without needing a database like access or sql?
Ron Drew
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform.
Dedicated processor, RAM, and server resources provide dedicated server
performance at virtual server prices. Commercial components provided; custom
components allowed.
leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #3 by "Drew, Ron" <RDrew@B...> on Thu, 14 Dec 2000 17:36:29 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C0661E.4D2164A0
Content-Type: text/plain;
charset="iso-8859-1"
Thank you ,,,,I will give it a try
-----Original Message-----
From: Unterste, Andreas [mailto:unterste@d...]
Sent: Thursday, December 14, 2000 1:23 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Guestbook
You wouldn't need a database, but I'd highly recommend one - it's so much
more flexible and easy to handle to if you read up on some of the ADO stuff.
Nevertheless, this should get you started (the ADDGUEST.HTML would have to
bekome ADDGUEST.ASP)
I'd split my GUESTBOOK.HTML into two files, one with the whole HTML wrapper
around it, the other one as include file (html formatted though) like
guestbookentries.inc
- which makes it also guestbook.asp afterwards. (unless somebody confirms
server side include to work with .HTML ?)
<% 'Appending Entries
'Reading from the Guest
strGuestName = request.form("txtGuestName") 'supposing this
to be valid input fields in Guestbook.html
strGuestEmail = request.form("txtGuestEmail")
Set fso = CreateObject("Scripting.FileSystemObject")
Set TextStream = fso.OpenTextFile("GuestBookEntries.inc")
TextStream.WriteLine ("<p>" & strGuestName & " was here on " &
date() & "<br>")
TextStream.WriteLine ("and left the following email : " &
strGuestEmail & "</p>")
TextStream.Close
Set TextStream = nothing
Set fso = nothing
response.write("Your entry has been added")
'or alternatively, just point again to the guestbook.asp - to have
the record displayed with all others
'response.redirect("GuestBook.asp")
%>
Pretty simple, but you get the idea.
Cheers,
Andreas
Andreas Unterste
-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Thursday, December 14, 2000 14:23
To: ASP Web HowTo
Subject: [asp_web_howto] Guestbook
I asked this question a few days ago but I dont think I presented it
correctly based on the answers.
I have a site with a guestbook that I just moved ISP from unix to NT. Have
problems with perl so I want to do the following.
Starting with what I have GUESTBOOK.HTML and ADDGUEST.HTML (the guestbook
itself and a form for updating), addguest.html currently executes a perl
script to update guestbook.html. When guestbook.html is reloaded, bingo the
new entry is shown.
How can I do this with asp without needing a database like access or sql?
Ron Drew
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform.
Dedicated processor, RAM, and server resources provide dedicated server
performance at virtual server prices. Commercial components provided; custom
components allowed.
leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform.
Dedicated processor, RAM, and server resources provide dedicated server
performance at virtual server prices. Commercial components provided; custom
components allowed.
leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #4 by "Drew, Ron" <RDrew@B...> on Thu, 21 Dec 2000 08:51:50 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C06B55.2B185120
Content-Type: text/plain;
charset="iso-8859-1"
I wrote the following script after feedback from one of you nice people. I
am now getting a permission denied message which displays a no page found
message. Please take a quick look at it and let me know if I have done
something wrong or does the ISP have to do something...procedure is
TGUESTBOOK.HTML calls TADDGUEST.HTML which in turns calls
MERGEGUEST.ASP..not sure where it goes from there yet.
<%@ Language=VBScript %>
<%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Gets the Parameters from Guestbook Form
function GetFields()
Dim strRealname, strUsername, strCity, strState, strCountry, strURL,
strHowfound, strPrivate, strMessage
strRealname = Request.Form("realname")
strUsername = Request.Form("username")
strCity = Request.Form("city")
strState = Request.Form("state")
strCountry = Request.Form("country")
strURL = Request.Form("url")
strHowfound = Request.Form("howfound")
strPrivate = Request.Form("private")
strMessage = Request.Form("message")
Response.Write strRealname
Response.Write strUsername
Response.Write strCity
Response.Write strState
Response.Write strCountry
Response.Write strURL
Response.Write strHowfound
Response.Write strPrivate
Response.Write strMessage
end function
%>
<HTML>
<HEAD>
<title>Merge Guestbook with input Form</title>
</HEAD>
<BODY>
<pre>
<%
Response.Write GetFields()
dim strtext,objStream
set objFile = server.CreateObject("Scripting.FileSystemObject")
set objStream = objFile.OpenTextFile("tguestbook.html",2)
'set objStream = server.CreateObject("ADODB.Stream")
'objStream.Open "URL= http://www.xxx.com/guestbook/tguestbook.html
<http://www.xxx.com/guestbook/tguestbook.html>
",adModeReadWrite,adOpenStreamFromURL
objStream.Charset = "Ascii"
objStream.SkipLine(21)
strtext = "<B>" & strMessage & "</b><br>" & _
strRealname & "<br>" & _
strCity & ", " & strState & " " & strCountry & "<br>" & _
"<a href='mailto:" & strUsername & ">" & _
strUsername & "</a><br>" & _
strURL & "<br>" & _
"Found Us by: " & strhowfound & "<br>" & _
"Private Message? " & strPrivate & "..you must be kidding!!<br>"
& _
date() & "<hr><br>"
objStream.Write strtext
objStream.Close
set objStream = nothing
set strtext = nothing
%>
</pre>
<P> </P>
</BODY>
</HTML>
Ron Drew
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #5 by "Unterste, Andreas" <unterste@d...> on Fri, 22 Dec 2000 02:16:23 -0500
|
|
check whether the IIUSR_[machine_name] has write permission to your
guestbook file.
-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Thursday, December 21, 2000 14:52
To: ASP Web HowTo
Subject: [asp_web_howto] Guestbook
I wrote the following script after feedback from one of you nice people. I
am now getting a permission denied message which displays a no page found
message. Please take a quick look at it and let me know if I have done
something wrong or does the ISP have to do something...procedure is
TGUESTBOOK.HTML calls TADDGUEST.HTML which in turns calls
MERGEGUEST.ASP..not sure where it goes from there yet.
<%@ Language=VBScript %>
<%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Gets the Parameters from Guestbook Form
function GetFields()
Dim strRealname, strUsername, strCity, strState, strCountry, strURL,
strHowfound, strPrivate, strMessage
strRealname = Request.Form("realname")
strUsername = Request.Form("username")
strCity = Request.Form("city")
strState = Request.Form("state")
strCountry = Request.Form("country")
strURL = Request.Form("url")
strHowfound = Request.Form("howfound")
strPrivate = Request.Form("private")
strMessage = Request.Form("message")
Response.Write strRealname
Response.Write strUsername
Response.Write strCity
Response.Write strState
Response.Write strCountry
Response.Write strURL
Response.Write strHowfound
Response.Write strPrivate
Response.Write strMessage
end function
%>
<HTML>
<HEAD>
<title>Merge Guestbook with input Form</title>
</HEAD>
<BODY>
<pre>
<%
Response.Write GetFields()
dim strtext,objStream
set objFile = server.CreateObject("Scripting.FileSystemObject")
set objStream = objFile.OpenTextFile("tguestbook.html",2)
'set objStream = server.CreateObject("ADODB.Stream")
'objStream.Open "URL= http://www.xxx.com/guestbook/tguestbook.html
<http://www.xxx.com/guestbook/tguestbook.html>
",adModeReadWrite,adOpenStreamFromURL
objStream.Charset = "Ascii"
objStream.SkipLine(21)
strtext = "<B>" & strMessage & "</b><br>" & _
strRealname & "<br>" & _
strCity & ", " & strState & " " & strCountry & "<br>" & _
"<a href='mailto:" & strUsername & ">" & _
strUsername & "</a><br>" & _
strURL & "<br>" & _
"Found Us by: " & strhowfound & "<br>" & _
"Private Message? " & strPrivate & "..you must be kidding!!<br>"
& _
date() & "<hr><br>"
objStream.Write strtext
objStream.Close
set objStream = nothing
set strtext = nothing
%>
</pre>
<P> </P>
</BODY>
</HTML>
Ron Drew
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |