Jump to content

comment boxs


Guest muleman

Recommended Posts

Guest muleman

hi im kinda new at making websites and so i wonderd if any one knows how to make one of them comment boxes where it lokks like this:Name:Comment: Sendand the name and comment is posted back into that page..im tryn to make a website for my art work and would like people to be able to send in thier comments aswel as others.im using dreamweaver to make the website and any help will be greatly appreicate.

Link to comment
Share on other sites

hi im kinda new at making websites and so i wonderd if any one knows how to make one of them comment boxes where it lokks like this:Name:Comment: Sendand the name and comment is posted back into that page..im tryn to make a website for my art work and would like people to be able to send in thier comments aswel as others.im using dreamweaver to make the website and any help will be greatly appreicate.

I would probably do something like this:<form method="post" action="formProcessor"><table><tr><td>Name</td><td><input type="text" name="userName" /></td></tr><tr><td>Comment</td><td><textarea rows="10" cols="30"></textarea></td></tr><tr><td><input type="submit" value="Submit Comment" /></td><td> </td></tr></table></form>This should give you a very basic form. But it includes no styles so it probably won't be too appealing to the eye. If you would like the comments e-mailed to your personal e-mail address or stored in a database, you will need a server-side PHP, CGI, Java, Pearl, ASP, etc. script to do that for you. I hope this helps.lugos
Link to comment
Share on other sites

if you go the first route:a.) add the "valign" attribute to all your <td> to make sure your text lines up at the top of each cell so that people more clearly see which label is for which field.b.) no doubt a table can be used here, but I prefer to stay away from them (for layout) when possible, so this is how I would code it:

<form method="post" action="formProcessor">Name<br /><input type="text" name="userName" /><br /><br />Comment<br /><textarea rows="10" cols="30"></textarea><br /><br /><input type="submit" value="Submit Comment" /><br /></form>
I won't clutter or confuse you with other tags and attributes that I would include - see http://www.w3schools.com/html/html_forms.aspc.) Dan the Prof has a good suggestion, but since you are "new" to this, I would keep it simple and do everything as inline code until you are more comfortable.NOW, that is only half the request you made. If you want your pages to retain the information you submitted, then you will have to use something like javascript to process the form values and set them as cookies. Then, wherever you want them you will need to use javascript again to output the values stored in the cookies.Of course, all this is much easier using a scripting language like php, asp, or cold fusion. Since you have posted this in the "General" forum that's as far as I will go with that. If you have a particular language in mind, I would post another message in the respective forum asking how it can be done.
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...