1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to write form data from one page to another

Discussion in 'C#' started by Doc Barleycorn, Oct 22, 2008.

  1. #1
    Greetings, hope you can help with a simple solution to this problem.
    I simply want to write form data from one page 'contact02.html' to another, guestlist02.html'. My hosting site is using windows shared hosting and allows only asp or asp.net scripts, and I know my pages will need to be named contact02.asp or aspx, and guestlist02.asp or aspx. I have found literally dozens of free scripts, but the more I try, the more confused I become. I will copy the present code for the pages here:

    contact02.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>Contact02</title>
    </head>

    <body>
    <table border="1" width="90%" align="center">
    <tr>
    <td width="34%">&nbsp;</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>
    <br>E-Mail&nbsp;<input type="text" name="email" value="">
    <br><br>Comments<br>
    <textarea name="comments" rows="6" cols="33">~under construction~</textarea><br>
    <input type="submit" value="Submit">
    <br><input type="reset" value="reset"></form>
    Code (markup):
    </td>
    </tr>
    </table>
    </body>
    </html>

    guestlist02.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>Guestlist02</title>
    </head>

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

    <td width="60%" valign="top">
    Guest Book & Comments
    Code (markup):
    <br><br></td>
    </tr>
    </table>

    </body>
    </html>

    I placed code tags around the form I want to write from and around where I want it written, and copied only the pertinent parts of the html code. If I need to clarify further please ask.
    Any help would be appreciated, thanx in advance
    Doc Barleycorn
     
    Doc Barleycorn, Oct 22, 2008 IP
  2. vri

    vri Peon

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <%=Request.Form("comments")%>
    HTML:
     
    vri, Oct 25, 2008 IP
  3. palme

    palme Active Member

    Messages:
    320
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Contact02.asp has a form that have an action directed to the gestlist.asp

    <FORM NAME="comment-list-Form" ACTION="gestlist.asp" method="POST" >
    <TABLE BOREDER="0">
    <TR><TH>Name</TH><TD><INPUT TYPE="TEXT" name="txtName" SIZE="35%" value=" " ></TD></TR>
    <TR><TH>Mail</TH> <TD><INPUT TYPE="TEXT" name="txtEMail" SIZE="40%" value=" "></TD></TR>
    <TR><TH>Comment</TH><TD><TEXTAREA name="txtComment" rows="5" cols="45" /></TEXTAREA><TD></TR>

    <TR><TD>&nbsp;</TD><TD><INPUT TYPE="SUBMIT" VALUE="Submit"></TD>
    <TD><INPUT TYPE="RESET" name="idReset" VALUE="Reset"></TD>
    </TABLE>
    </FORM>
    -------------------------------
    gestlist.asp
    ................
    .......................
    Dim strName , strEMail, strComment, objRS

    strName = Request.form("txtName")
    strEMail = Request.form("txtEMail")
    strComment = Request.form("txtComment")

    and know , you must have a databse , and a table with minimum 3 field, Name, Email and Comment and
    you save this record on the database , i.e.
    ............
    .............

    objRS.AddNew
    objRS("Name") = strName
    objRS("EMail") = strEMail
    objRS("Comment") = strComment
    objRs.Update

    and save it to the gestbook database, that's all
     
    palme, Oct 25, 2008 IP
  4. dinomflorist

    dinomflorist Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    use this script

    <form action="guestlist02.html" enctype="" target="_blank"> Name&nbsp;
    <input type="text" name="name" value=""><br>

    and you must know database to show your field record
     
    dinomflorist, Oct 28, 2008 IP