Click to See Complete Forum and Search --> : Collecting from form


Webboy37
12-04-2003, 10:51 AM
Hi,
I am new to webpage building. Currently, I am in the process of form construction. All the form commands I seem to have grasp properly with the exception of understanding where the information goes. Sending the information through Email was a breeze. But what I really want to do is to send the information to the same web but on a different page-- this is only for the purpose of learning, and getting to see how the information is presented in text form on a webpage. This is what I came up with in trying to have the form email to an email address:<FORM METHOD="POST" ACTION="mailto:jimmy12@ttportal.com">
Now this is just for an email, but what about if I just wan to send the message to the same site?
I will take all the suggestions that I can get. Thank you all in advance.:eek:
~~~~~~~~~~~~
James

Phil Karras
12-31-2003, 01:33 PM
This is really an HTML question not a CGI question.

You can post things to yourself even on your own machine


<FORM METHOD="GET" ACTION="MyNext.html">


Notice that I changed the POST to a GET. This places the data on the URL line (so there is a limit to how long it can be) but you'll get the idea.

Now, with JavaScript (or probably vbscript and others as well, but JS is supported by ALL browsers) you can read the URL and split the data out of the URL and put it into vars so it can be used on your MyNext.html page.

To learn more about JavaScript pick up a good book like: "Teach yourself JavaScript in 24 Hours" by Michael Moncur, Pub: SAMS. His JS site is at: http://www.jsworkshop.com/

This site also has a very good JavaScript support section. The difference is that Michael's is for beginners learning JS and the questions are kept simple and the answers lead you to a solution, they do not write your code for you.

If you're posting to a server-side script which will build a new HTML page you do it like this:


<FORM METHOD="POST" ACTION="http://www.MyISP.com/MyNext.pl">


I've assumed a Perl .pl program is the receiver, it could have been an ASP, JSP, PHP, etc program, doesn't matter.

Once there the server-side program takes over, and at that point you'll need to learn server-side programming.

My suggestion for that is to learn the server-side language your ISP supports.