Connecting Tech Pros Worldwide Forums | Help | Site Map

How to write guestbook form data to a second page

doc barleycorn's Avatar
Newbie
 
Join Date: Oct 2008
Posts: 2
#1: Oct 23 '08
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>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>
</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>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<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's Avatar
Expert
 
Join Date: Oct 2008
Location: Bristol, United Kingdom
Posts: 143
#2: Oct 23 '08

re: How to write guestbook form data to a second page


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.Querystring("somevariable") on the second.
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#3: Oct 24 '08

re: How to write guestbook form data to a second page


Quote:

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:
Expand|Select|Wrap|Line Numbers
  1. <%="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
Reply


Similar ASP / Active Server Pages bytes