Guest Nitrub Posted March 18, 2006 Share Posted March 18, 2006 I wrote a little code. <html><head><title>Paroolikaitse!</title></head><body bgcolor=#dbdbdb><center><form>Kasutajanimi<br><input type="username" name="username"><br>Parool<br><input type="password" name="password"><br><br><input type="submit" value="Sisene"></form></center></body></html> And the result was this: http://www.burtin.msn.ee/parool.JPGNow I want to do so, that i enter correct username and password and then it directs it to ma website (homepage: http://www.burtin.msn.ee). The problem is that I can't manage that.Is somebody so helpful and helps me or gives me a website, where I can learn that. Link to comment Share on other sites More sharing options...
scott100 Posted March 18, 2006 Share Posted March 18, 2006 Find out what server side language your host supports, probs either PHP or ASP.Then check out the relevant tutorial for that language, specifically form handling.for PHP: http://www.w3schools.com/php/php_forms.aspfor ASP: http://www.w3schools.com/asp/asp_inputforms.aspIf you run into trouble writing the script then there are forums here for both the above languages and someone will help you out. Link to comment Share on other sites More sharing options...
Mephistopheles Posted March 18, 2006 Share Posted March 18, 2006 <script language="JavaScript"> <!-- function Try(passwd) { if (passwd =="password") { alert("Correct password"); location.href = "www.yourwebsite.com"; } else { alert("The password is incorrect. Please don't try again."); location.href = "www.wrong-password-url.com"; } } //--> </script> Link to comment Share on other sites More sharing options...
boen_robot Posted March 18, 2006 Share Posted March 18, 2006 JavaScript is totally not the answer. I can always turn my JavaScript and see the page OR look at the source code and copy the right URL.An .htaccess file could do it, but then again, a server side would be better. Link to comment Share on other sites More sharing options...
scott100 Posted March 18, 2006 Share Posted March 18, 2006 JavaScript is the last thing you would want to use for processing a form containing username and password.All i would have to do is view source, see that information and that's me at your page. It's like password protecting your pc then leaving your little black book of passwords beside it for anyone to see, it kinda defeats the purpose! Read up on your server side language Link to comment Share on other sites More sharing options...
everyone Posted December 4, 2006 Share Posted December 4, 2006 yes but who knows how to do that? mabie about 1% of people so the chances are it will work Link to comment Share on other sites More sharing options...
aspnetguy Posted December 4, 2006 Share Posted December 4, 2006 yes but who knows how to do that? mabie about 1% of people so the chances are it will workActually it is very easy to do. It is not a good idea to process iportant info like username and password with JS Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now