Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try {
- $db = new PDO("mysql:host=xoxo; dbname=xoxot", xoxo, "xoxo");
- }
- catch(PDOException $e)
- {
- die( "Can't connect to database. Error: " . $e->getMessage() );
- }
- $User=$_REQUEST['usermail'];
- $Password=$_REQUEST['password'];
- $conv=hash('whirlpool',$Password);
- $Pass2= strtoupper($conv);
- foreach ($db->query('SELECT Password FROM Accounts WHERE Name='.$db->quote($User).'') as $row) {
- }
- if($Pass2!=$row['Password']) die("Error: Invalid User/Pass <br> <a href=\"ucp.html\">Home Page</a>");
- else{
- session_start();
- $_SESSION["Name"] = $User;
- $_SESSION["Logged"] = "true";
- echo("Logged: ".$_SESSION["Logged"].".");
- echo("Name: ".$_SESSION["Name"].".");
- header("Location: panel.php");
- }
- ?>
Add Comment
Please, Sign In to add comment