I’m not 100% certain as to what you’re doing with the login details that the user has typed in. I assume that you are performing some validation somehow and that may affect the answer.
However, to have a HTML form direct you to another web page you add the URL for that page to the form action attribute e.g.
This isn't an HTML question. There must be some code running on the server, eg PHP or ASP, which takes your username and password and checks to see if they are valid. It's this code that determines where you go after a successful login. You'll need to alter it so that it redirects the user to the page you want.
Oh, and to the above poster - I wouldn't recommend putting the username/password validation code in client-side Javascript, as you imply. This makes it simple to crack - a user can just do View Source in the browser and you can see the JS code, and will quickly be able to find out what the acceptable values are. Very insecure. This code should run on the server only.
2007-05-10 09:32:08
·
answer #2
·
answered by Daniel R 6
·
0⤊
0⤋
NEVER put any usernames/passwords in HTML nor in Javascript. As said above, it is visible!
Use a form to send the data from HTML, i.e.
The file "checkpass.php" is written in PhP. It runs only on the server (not on user machine). It receives the data ($user and $pwd). It calls a list of users and passwords (i.e. a list or a data-base in SQL). It validates the password and returns true or false.
To jump somewhere else, you can use java:
window.location(myhtmlpage);
Do not use window.history(-1) or similar: it does not necessarely return to the right page (if the user has clicked refresh for example).
The meta "refresh" does no do what is said above! It means that the page will refresh every second!
2007-05-14 05:01:56
·
answer #3
·
answered by just "JR" 7
·
0⤊
0⤋
I sort of agree with both of you. It really depends on what you are trying to protect with your password. I have a section with family photos on my site which uses a front end java app as quite frankly, if people want to crack it and look at pics, well thats fine but it will keep out the casual browser (and in fairness thats lots of people).
For my job however, I run an ecommerce site which I dont want people to crack as it stores all sorts of user data etc etc and uses .net and SQL to validate the user who are then passed to the page I want them to arrive at. This is all done by script so its all down to how secure you want your protected section to be really.
ASP/ASPX or PHP are very good ways of doing it if you have some skill, if not then you are sure to be able to find someone who has already written the code for you to use....
Try here http://www.devshed.com/
2007-05-10 11:43:51
·
answer #4
·
answered by stevieperv 2
·
0⤊
0⤋
There are 2 kind of that
1. Built in example > http://login.yahoo.com
2. Prompt Session example > http://members.videoz.com
for your question i like to know witch one is your question. ??
for now i only have for no.2
let say you want to go automatically to www.page.com
and you have valid username and password for that.
Username=user
Password=pass
and for your automatic link should be like this !!
>> http://user:pass@www.page.com
just simple like that ....
Andi Ahdin
Indonesia
2007-05-10 12:47:16
·
answer #5
·
answered by Andi Ahdin 4
·
0⤊
1⤋