Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once('Settings.php');
- /*
- * MySQL Information
- */
- if(!$_POST){
- echo 'You missed something!';
- } else {
- $connection = mysql_connect($server, $muser, $mpass) or die('Unable to connect to MySQL Database.');
- mysql_select_db($dbase);
- $query = mysql_query("SELECT * FROM accounts WHERE username ='".$_POST["username"]."' AND password ='".$_POST["password"]."'");
- $rows = mysql_num_rows($query);
- if($rows != 0) {
- /* Fetching account information */
- while ($row = mysql_fetch_assoc($query)) {
- $playerName = $row['username'];
- $playerPass = $row['password'];
- }
- /* Saves username to a cookie placed in the browser */
- setcookie($uncookie, $playerName, time()+3600);
- /* Saves password to a cookie placed in the browser */
- setcookie($pwcookie, $playerPass, time()+3600);
- include('thanks.php');
- } else {
- include('./login/error.php');
- }
- }
- ?>
Add Comment
Please, Sign In to add comment