Results 1 to 2 of 2

Thread: help

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    W.Lafayette, In USA
    Posts
    37
    Can someone tell me why this does not display anything on my webpage.

    <HTML>
    <HEAD>
    <Title>Guestbook</Title>
    </HEAD>
    <BODY>
    <%

    Dim strFile

    strFile = Server.Mappath("guestbook.txt")
    If Request.Form.Count = 0 then
    %>
    <H2>Sign My Guestbook: </H2>
    <Form Action ="Guestbook.asp" Method = "post">
    <p>Name: <Input Name = "name" Type = "TEXT" SIZE = "30" Maxlength = 40" ></p>
    <P>Email: <Input Name = "email" Type = "TEXT" SIZE = "40" Maxlength = "50" ></p>
    <p>Comment: <TextArea Name = "comment" Rows = "7" Cols = "35"></Textarea></p>
    <Input Type ="submit" Value = "Sign GuestBook"></p>
    </Form><BR>
    <H3>Today's Comments:</H3>


    <%

    Else
    Dim objFSO
    Dim objFile
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set objFile = objFso.OpenTextFile(strFile, 8, True)
    objFile.Write "<B>"
    objFile.Write "Guest #:"
    objFile.Write "</B> "
    objFile.Write Server.HTMLEncode(Request.Form("name"))
    objFile.Write "said "
    objFile.Write Server.HTMLEncode(Request.Form("comment"))
    objFile.Write " on 11/14/00"
    objFile.Write "<BR>"
    objFile.Write " <B>Email: "
    objFile.Write Server.HTMLEncode(Request.Form("email"))
    objFile.Write "</B>"
    objFile.Write "<BR>"
    objFile.WriteLine ""
    objFile.Close
    Set objFile = Nothing
    Set objFile = Nothing
    %>
    <H3>Your comments have been written to the file!</H3>
    <A href="./Guestbook.asp">Back to the guestbook</A>
    <% End if %>
    </Body>
    </HTML>


    Thanks in advance

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    If Request.Form.Count = 0

    Perhaps this evaluates to False?
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width