user posting info on a web page

liunx

Guest
HI.<br />
<br />
I have no idea how to do this or if this is even the right room, but what the hell?<br />
<br />
This is what I would like to be able to do. I would like to have a user be able to enter info in text fields and then be able to submit it via the web. Once it is submitted the information will be posted on the web page in the appropriate place.<br />
<br />
How do I do this?<br />
<br />
Thanks,<br />
Steve<!--content-->you have to use some form of serverside language, like cgi (perl) or php (easiest) or ASP.<br />
<br />
but your host also must support those languages as well.<!--content-->if you only want to display it, you can use javascript too though<!--content-->not very secure to have everything in the url or have javascript to display it<!--content-->Ok, while not secure here is a way to do it (maybe for fun)<br />
:<br />
<br />
<br />
page1:<br />
<br />
<html><br />
<head><br />
<br />
<script><br />
function redir(form){<br />
var txt=escape(form.usr.value);<br />
window.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/">http://www.htmlforums.com/archive/index.php/</a><!-- m -->"http://page2.html?"+txt;<br />
}<br />
</script><br />
</head><br />
<body><br />
<form><br />
<input type="text" name="usr" value="" size=50><br />
<input type="button" onclick="redir(this.form)" value="go"><br />
</form><br />
</body><br />
</html><br />
<br />
page2:<br />
<br />
<html><br />
<head><br />
<script><br />
var txt = false;<br />
txt = unescape(window.location.search);<br />
if (txt){ <br />
txt = txt.substring(1); // remove the question mark<br />
} else {<br />
txt = "no data transferred";<br />
}<br />
</script><br />
<br />
</head><br />
<body><br />
<h1> Hellow</h1><br />
<br><br><br />
<font size=+3>Here is your text: <br />
<script>document.write(txt)</script></font><br />
</body><br />
</html><!--content-->try B2... <!-- w --><a class="postlink" href="http://www.cafelog.com">www.cafelog.com</a><!-- w --><!--content-->
 
Back
Top