Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'configMick.php';
- session_start();
- $formUsername=$HTTP_POST_VARS["username"];
- $formPassword=$HTTP_POST_VARS["password"];
- $formIdentity=$HTTP_POST_VARS["identities"];
- $query="select * from $formIdentity where username='$formUsername'";
- $result=mysql_query($query);
- $row=mysql_fetch_array($result);
- if ($row)
- {
- if ($row["userpass"]==$formPassword)
- {
- session_register("password");
- $_SESSION["password"]=$formPassword;
- session_register("username");
- $_SESSION["username"]=$formUsername;
- session_register("identities");
- $_SESSION["identities"]=$formIdentity;
- if($formIdentity=="Judge")
- {
- session_register("judgeloggedin");
- $_SESSION["judgeloggedin"]="true";
- echo "<script>location.href='judges_login.php';</script>";//
- }
- else if($formIdentity=="Artist")
- {
- session_register("artistloggedin");
- $_SESSION["artistloggedin"]="true";
- echo "<script>location.href='Artist.php';</script>";
- }
- exit;
- }
- else
- {
- echo '<script>alert("Else1- your password is wrong"); </script>';
- $response.="Your password is wrong.";
- echo "<script>location.href='Backstage-pass.php';</script>";
- }
- }
- else
- {
- echo '<script>alert("Else2- Your username and password are wrong: ' . $formUsername . ' ' . $formPassword . ' ' . $formIdentity . '");</script>';
- $response.="Your username and password are wrong.";
- echo "<script>location.href='Backstage-pass.php';</script>";
- // close mysql connection
- mysql_close();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement