A very basic "Comments" field

A very basic "Comments" field

Posted by: amardeep33
Posted on: 2009-01-14 20:32:00

Hello.
I'm trying to make a basic "Comments" page where users can submit comments along with their name and email. I have code which creates the fields for the text, but I'm not sure how to actually store the comments I receive in a separate text file/html file/ anything.
My code so far (which I stole from some other site because I don't actually know how to code yet) is:

<body>
<form action='comments.php' method='get'>
<div id='commentform'>
<table>

<tr><td><label for='name'>Name and Email(optional)</label></td><td><input type='text' id='name' name='name' size='35' value='' /></td></tr>
<<tr><td><label for='comments'>Comments</label></td><td><textarea id='comments' name='comments' cols='50' rows='8'>
</table>
<input type='submit' name='submit' value='Submit'/>
</div>
</form>

</body>


What should I add in order for the comments to be stored in a file. Is the code I already have completely wrong/not going to work?♠
Any help is greatly appreciated.
Thanks.

Edited by amardeep33 on 01/14/09 08:33 PM (server time).

Re: A very basic "Comments" field

Posted by: Atropos7
Posted on: 2009-01-14 21:53:00

In reply to:

I'm trying to make a basic "Comments" page where users can submit comments along with their name and email. I have code which creates the fields for the text, but I'm not sure how to actually store the comments I receive in a separate text file/html file/ anything.


If you want to do it in PHP with MySQL perhaps you can learn from
this PHP/MySQL Tutorial



cool openvein.org -//-

Re: A very basic "Comments" field

Posted by: scjessey
Posted on: 2009-01-16 06:02:00

If you aren't familiar with coding, I would recommend that you setup some sort of "guestbook" feature, which is similar to the functionality you appear to be looking for.

-- si-blog --

Re: A very basic "Comments" field

Posted by: Ryo-ohki
Posted on: 2009-01-16 10:11:00

are you meaning something like i have here? http://marciesgifts.com/contact? first off you will need some sort of script to actually process the form. comments sent to me from that link are sent to my e-mail address and not stored in a file. I'm using a php form mail script. it is similar to Matt's Form Mail script, probably what DH uses here http://wiki.dreamhost.com/Formmail

I've uploaded it to my website so you can download it since I can't remember the original website that I got it from. Just look at the readme.html file and it's pretty simple to use. Send me a message if you still need help. http://dev.marciesgifts.com/formmail.v50.zip

Store: http://www.marciesgifts.com
PM for custom CMS or forum install/host transfer $75.
$25 Off with promo code SPRINKLES