Log in

View Full Version : Resolved Just need assistance with figuring out a basic form



WebDizzy777
10-01-2013, 01:45 PM
I hope this is being posted in the correct place. I would like to create a basic form just so users could input their email address. The HTML part is pretty simple and self explanatory, for example on the W3 schools it gives this example:


<form action="demo_form.asp" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>

However, in order to receive the input from the users, it will write it to an asp file correct, or wrong? In this example to "demo_form.asp" BUT I do not understand how to write that asp form or how to even upload it or where it goes or where to put the asp code if I come across an already written one or where it goes or anything, I'm very lost, on how to just get the stuff the user inputs. Thanks for any advice or direction.

jscheuer1
10-02-2013, 12:57 PM
First you need to have an asp capable server, do you?

The file demo_form.asp wouldn't write this information to itself, that would be inefficient. Usually it will write the data to a database, but a plain test file or a comma delimited file could be used. This file would be created if it doesn't exist or added to if it does. If using a database, that would have to be setup ahead of time. At the same time that it does that, it will show something to the user, like:


Thanks for signing up!

And have a link or links to where you want the user to be able to go next.

My asp is a bit rusty though, and I've never used a formal database, so I'm not sure what exactly should go in the demo_form.asp page. I'm sure there are templates for that sort of thing available and the W3 Schools tutorial will get you the asp basics:

http://www.w3schools.com/asp/

WebDizzy777
10-04-2013, 04:11 PM
It turns out my hosting plan had a form mailer for me. They gave me the code to replace
<form action="demo_form.asp" method="get"> with the direction to their PHP form file. So it was as easy as writing the HTML form and using their PHP pre-written code, and the form input from my website visitors gets sent to me. Thanks for the advice!