How to write guestbook form data to a second page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doc barleycorn
    New Member
    • Oct 2008
    • 2

    #1

    How to write guestbook form data to a second page

    I am trying to have a guestbook form on one page write to a second page. The pages are .html, and I know they need to be .asp, but every script I have tried doesnt work. My hosting account is shared windows and only allows asp scripting. Site is on godaddy.com. I will post the two pages here, and have removed all but the key elements. I tried various tutorials, and I know there must be two dozen ways to do it, but I have not been successful. If you need to see the site itself, let me know and I will post a link.

    [HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Contact0 2</title>
    </head>

    <body>
    <table border="1" width="90%" align="center">
    <tr>
    <td width="34%">&nb sp;</td>
    <td width="32%">
    </td>
    <td width="34%" align="center"> <h4>Sign my Guest Book & add Comments</h4><br><form action="" enctype="" target="_blank" > Name&nbsp;
    <input type="text" name="name" value=""><br><b r>E-Mail&nbsp;<inpu t type="text" name="email" value=""><br><b r>Comments<br>< textarea name="comments" rows="6" cols="33">~unde r construction~</textarea><br><i nput type="submit" value="Submit"> <br><input type="reset" value="reset"></form>
    </td>
    </tr>
    </table>
    </body>
    </html>[/HTML]

    [HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Guestlis t02</title>
    </head>

    <body>
    <table border="1" width="90%" align="center">
    <tr>
    <td width="30%" valign="top">&n bsp;</td>

    <td width="60%" valign="top">Gu est Book & Comments<br><br ></td>
    </tr>
    </table>

    </body>
    </html>[/HTML]

    I am simply trying to get the info entered on the first page to write to the form space on the second. Nothing fancy or complicated. Any help you can provide or suggestions would be greatly appreciated.
    Thnanx, Doc Barleycorn
  • GazMathias
    Recognized Expert New Member
    • Oct 2008
    • 228

    #2
    You need to learn to learn to handle forms in ASP.

    This page on W3Schools will show you how to achieve what you want.

    In the example tho, the page is calling itself, but the same principle will apply to calling an alternate page.

    The bits you are interested are "<form action ='somepage.asp' >" on the first page and Request.Queryst ring("somevaria ble") on the second.

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Originally posted by doc barleycorn
      I am trying to have a guestbook form on one page write to a second page. The pages are .html, and I know they need to be .asp, but every script I have tried doesnt work. My hosting account is shared windows and only allows asp scripting. Site is on godaddy.com. I will post the two pages here, and have removed all but the key elements. I tried various tutorials, and I know there must be two dozen ways to do it, but I have not been successful. If you need to see the site itself, let me know and I will post a link.
      Doc,

      You say every script you have tried hasn't worked. Have you tried something very very basic just to test whether scripting is actually turned on? for example:
      Code:
      <%="Hello Doc Barley Corn"%>
      if scripting is turned on it should print out just "Hello Doc Barley Corn", but if not, it will print out the whole code.

      Jared

      Comment

      Working...