Jump to content

First database form ...


tb582

Recommended Posts

Hi guys hopefully you can help me out. I was presented with a challenge to create a form that users will fill out online. There are a handful of questions mostly with check box answers, and a couple of areas to type your name and the date. NOTE: this form is currently only on paper... Now how do I go about making this form into an "online" version? I can definitely create the HTML form that's not a problem. Basically I need users to be able to fill out this form online and then have the results collected. And possibly have the admin be able to generate a report of the forms that have been submitted.

Link to comment
Share on other sites

You will need a server side lanaguage like PHP or ASP and a database.I recommend reading the PHP tutorials. They will show you the basics you will need to know and the basics of wqorking with a database.

Hmm well I could use either PHP or asp, I have never used PHP before and only used asp a bit... Could give me a same of what my code would look like?lets say there is a question that asks what your race/ethnicity is, and there are 4 or 5 check boxes. I don't have a problem creating the html code for the check box and text. So I guess I'm asking is what the server side code would look like...
Link to comment
Share on other sites

HTML

Ethnicity<br/><input type="radio" id="ethnicity" value="Asian"/> Asian <input type="radio" id="ethnicity" value="African"/> African<input type="radio" id="ethnicity" value="White"/> White<input type="radio" id="ethnicity" value="Hispanic"/> Hispanic

ASP

Dim ethnicity = Request.Form("ethnicity")

PHP

$ethnicity = $_POST["ethnicity"];

Link to comment
Share on other sites

That is how you get the value of the option choosen. You would have to continue to open the database and INSERT the values into it with SQL.I am not going to provide you with a long script for that mostly because I do not have time to write it.Also you should learn to do something like that on your own. Go through the PHP or ASP tutorials. All you need is covered there.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...