Thread: design help
View Single Post
  #4   Spotlight this post!  
Unread 10-12-2008, 22:34
DMetalKong's Avatar
DMetalKong DMetalKong is offline
Registered User
AKA: David K.
no team
Team Role: College Student
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Bridgewater
Posts: 144
DMetalKong is a jewel in the roughDMetalKong is a jewel in the roughDMetalKong is a jewel in the rough
Send a message via AIM to DMetalKong
Re: design help

The comment box would be just a form with a textarea in it.

Code:
<form method='post' action='YOUR URL HERE'>
<label for='comment_box'>Comments:</label><textarea name='comment_box' id='comment_box'></textarea>
<input type='submit' value='Submit' />
</form>

If you are asking for the code for how to store people's responses, you will need to do some server-side scripting. No matter what type of webserver you have w3schools as a great resource. You will probably want to check out the tutorials on HTTP POST and (assuming your webserver runs PHP) PHP. If you are using PHP, the PHP website is another great place for info.

Once you have POST'ed the data from your form, you will need a place on your server to store the comments. The more crude method would be to use filesystem functions and save the comments to a .txt on your server. The better way would be to use MySQL, a database system. MySQL allows for much better data organization than a dump into a file.

So, putting together a list of what needs to happen:
  1. Create a form for the user to input data
  2. Create a server-side script to get the data from the user
  3. Store the data either in a .txt file or in a database