Jump to content

Using Forms


StarGateSG-1

Recommended Posts

You could set up a simple form to gather the feedback and then have it submitted to an e-mail address when the submit button is clicked. But you want to be sure to set up the attributes correctly in the <form> tag first.

<form name="feedback" method="post" enctype="text/plain" action="mailto:youraddress@yourdomain.com?subject="Site Feedback">

Then when the user clicks on the submit button, it will be e-mailed to the address you specify. But this leaves your address open to web bots and can be easily harvested. That's why you may want to look into using a server based solution such as FormMail.

Link to comment
Share on other sites

I've never used a WYSIWYG editor, so I'm not very familiar with FrontPage. I use HTML-Kit for all of my code. But as far as whether or not you need a server, any site that you would want to receive feedback from would need to be hosted on a server of some sort. As far as getting the feedback sent to you, you would either need to use client-side language such as HTML & JavaScript, or use a server side language such as PHP. Some hosting services offer programs such as FormMail as part of their package. You might want to check to see what they may have to offer.

Link to comment
Share on other sites

Well, 'webbot' seems to refer to a lot of different things (including the W3C's own web crawler, a Microsoft FrontPage component, and some 'web scripting language').As far as I know though, you need to be able to communicate with a mail server in order to send email. I don't think there's any way around that, the server has to be what actually sends the mail, so you need some way of getting the formatted message to the server.It should be easy to get some free webspace to host something like this. But if it's for school, then you can probably just have a message pop up that says something like "if this were a live site, it would send an email at this point, but this demo does not have access to an email server".

Link to comment
Share on other sites

How can you send email without an email server? Are you just talking about clicking a link to open the mail client, or are you actually having the website create and send an automatic email?I guess I'm not sure what your question is. What do you mean by posting to another page? You can set the action of the form to any page you want, is that what you mean by posting?

Link to comment
Share on other sites

OK, I think you're a little bit confused. When you send email from a web page, there are basically two options. This is the first one:

<a href="mailto:test@test.com">Click here to email</a>

When someone clicks on the link, their own mail client will launch. So they click the link, and Outlook, or Thunderbird, or M2, or (god forbid) Goldmine or whatever opens with a new message to the address in the link. The person writes the email, hits send, and the email gets sent through the mail server that the user normally sends all their other email through. In this scenario, the web server doesn't do anything.The second option is to have someone fill out a form, press a submit button, and the web server creates and sends an email to some address. If you want to do this, you need the form to submit to some server-side scripting page (PHP, ASP, JSP, etc). The webserver running the page probably needs an email server installed on it, or at least have communication with another email server that it can get a message to. The server-side page will process the form, create an email, and pass it along to the mail server to send.If you want to do the second option, you need to find a web host that supports the language you want to use, either PHP or ASP or JSP. PHP is probably the easiest for a beginner. You can do this on your own computer if you really want to, but you will need to install and configure web server and email server software on your computer, in addition to installing PHP itself. It's much easier to get web space, or have your teacher provide you with web space.To set the form action, you do this:

<form method="post" action="process.php">

The process.php file will receive all of the submitted data.

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...