Okay, I've searched for this and have found some posts, but I just don't understand how to do it. I would copy and paste the code, but I don't understand what I need to change to make it work for my form.
I hope no one becomes annoyed by me, but here's my problem.
I have a form where people can write (well, type) comments about my new machinima series on my website, and when they push submit, it adds the information to a MYSQL table and displays all of them on a page. It's much like a forum, but a lot simpler.
Here's the link to the form:
http://mscreashuns.savefile.com/summerbreeze/users/insert_comment.html
and here's the page it will take you to and where the comments will be displayed:
http://mscreashuns.savefile.com/summerbreeze/discuss.php
I don't mind if you post test comments if that's what's needed to help me.
I've got it to work where it will display all of the comments and everything, but it keeps sending blank forms through. How can I prevent a form with any fields left blank from being added.
I have the following fields:
Name (text) name="name"
Email "" name="email"
URL "" name="url"
Comments (textarea) name="comments"
All of them except the URL field need to be required. If they are all filled in, I want it to add it to the table, which I know how to do. Also, if anyone knows how to make it check for an email format, could you add that too?
Thanks ahead of time for putting up with me and sorry for the long post.
(By the way, the emails aren't displayed, they are just kept for records in case of a nasty post so I can contact the flamer or disallow them from submitting comments)