Thread: Jave help with the (if) string
-
January 7th, 2004, 04:46 PM #1Registered User
- Join Date
- Jan 2004
- Location
- UK Manchester
- Posts
- 24
Jave help with the (if) string
I am using the below * part of script *
} if (usercode==115604600&&passcode==115604600);}
window.location=password+".htm"}
else
{
alert("password/username wrong")}
where the 115604600 are encrypted for user name and password
this works fine if only one user....
How do I add a string that will allow the if function to check against a second user and password ?
full origional script can be seen at http://www.dynamicdrive.com/dynamicindex9/password.htm
I want to use this but have it check more that one name and password
any one help?? or tell me a better script to check users and passwords before sending them to the page that relates to them?
Thanks the rave
-
January 7th, 2004, 07:47 PM #2Registered User
- Join Date
- Jan 2004
- Location
- UK Manchester
- Posts
- 24
well got no help but for anyone reading
I managed to find this http://www.geocities.com/SiliconVall...w/conteng.html
and it worked a treat... however if there is any people with more knowledge than me a novice could look at the .class files and tell me if there is anything dodgg written in the scripts that might be sending information to places other than where ist intended.
appreciated in advance.
-
January 8th, 2004, 09:45 PM #3Member
- Join Date
- Sep 2002
- Posts
- 364
I don't understand if this is for JavaScript or Java. Your first link is js, and the second looks likes its for a Java Applet. I don't use javascript much, but for regular java, you make a method has is called with two parameters passed in, and you check those variables against your values.
-
January 8th, 2004, 09:53 PM #4Registered User
- Join Date
- Jan 2004
- Location
- UK Manchester
- Posts
- 24
got the crap above sorted... just need to work on how .htaccess works so anyone accessing a folder using a direct link cant have access unless they have come from my login page
can anyone help with .htaccess
have a folder called /private with a login page that directs to subfolders in private eg /private/images
I want any folder in the /private/images folder to return an error on page unless its come from the login page
am i making sense???
the rave
-
January 12th, 2004, 12:50 PM #5Senior Member
- Join Date
- Oct 2001
- Location
- New Hampshire, USA
- Posts
- 641
Don't ask me how to do this, but have you considered having a successful login create an object with a property value you can check prior to opening a linked web page? If the individual browsing the web does not log in, then they would not have an instance of the "LoginSuccessfullyAuthenticated" object to check prior to loading a web page. You could store this object in memory and know that upon reboot it would be destroyed. Alternately you could build in a "time bomb" of sorts into the instance of the object that would destroy the "LoginSuccessfullyAuthenticated" object after a predetermined time interval.
Another method (less sophisticated) would be to create a cookie upon a successful login. This cookie could then be checked prior to loading specific web pages stored upon your site.
Hope this helps.Last edited by ctaylor; January 12th, 2004 at 12:52 PM.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



LinkBack URL
About LinkBacks



Reply With Quote

that was easy, if only deleting the partition was that simple.
Is It Just Me? v233893843