At least i hope its simple.
I’m not very used to JavaScript IFs.
Basically I need to know how to do IF {Condition} but ‘2’ conditions and im not sure of the syntax whether it is AND or not, so for example:
[CODE]if {
usernameParam = “Staff”) AND (passwordParam = “Invite”);
{
response.sendRedirect(“http://trentdev:8080/2009-sem2/cs205189/Final/login.html”);
}
else {
Then after that I just want it to carry on to my code that checks the user and pass in the Database because im trying to do a Special Login for Staff users that takes them to their own page.
Which is :
[CODE]ResultSet columns = statement.executeQuery(“SELECT * FROM Users WHERE Username='” +
usernameParam + “‘ AND Pass='” + passwordParam + “‘;”);
String sUserName=null;
String sUserPassword;
if(columns.next())
{
sUserName = columns.getString(“Username”);
sUserPassword = columns.getString(“Pass”);
}
Thanks for the help! ?