Jump to content

Simple form site


Renton

Recommended Posts

Hello all - I'm making a very very simple page for a small company - it's function is merely to send daily statistics to two managers. They want to be able to type in the site name, a password comes up, they enter it, and then they can enter the daily statistics and press send. Here's what I have so far:

<html><head><title>Statistics</title></head><body><form name="PassWord">Password: <input type="password" name="password"></form><form name="Form" action="mailto:me@hotmail.com" method="POST" enctype="text/plain"><br><table border="1" cellpadding="10" cellspacing="10"><tr><td valign="middle"><div align="center"><font size="+1">Statistics</font></div><table border="0" width="300" cellpadding="2" cellspacing="2"><tr><td width="60%">Thing One</td><td width="40%"><input name="One" size="10"></td></tr><tr><td>Thing Two</td><td><input name="Two" size="10"></td></tr><tr><td>Thing Three</td><td><input name="Three" size="10"></td></tr><tr><td><input type="submit" value="Send"></td></tr></table></form></body></html>

I know I'm missing some things, and I'm trying to do this with only html, but I'm sure I'll need to learn some more things. The mailto works, but only to one person (how do I make that two addresses?). However, I would love if it didn't bring up the default mailing program and just sent it instead - I also want to avoid using any of those sites that already have the code written for you... that's just a dignity thing. And obviously the password doesn't work - that has me confused. I've searched the site a few times and haven't found anything extremely helpful. Sorry if I missed something, thanks. -Renton

Link to comment
Share on other sites

You will probably need to learn enough php to use the mail() function and set a cc or bcc or a second to: address. Simple enough to do. Start with the php.net site and read up on the mail function.http://ca.php.net/manual/en/ref.mail.phpLet us know if you need any more info.

Link to comment
Share on other sites

Simply put, you can't do what you want to do using Javascript. You can't send mail to more then one person (actually you can't send mail at all, you can just make the user's mail program open), and you will have difficulty password-protecting anything. Someone can just look through the code to find the password. The only thing you could do to avoid that would be to find an implementation of something like SHA-1 or MD5 using Javascript, and then store the encrypted password instead of the plain-text password. But you will have a much easier time of doing this using PHP then you would trying to find solutions for all of the problems that Javascript has.

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