Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $db_username = "188068_kiwi"; // Your database username
- $db_pass = "anacondaz"; // the password to your username
- $db_name = "stellardissent_99k_d1"; // the name of the database your 'users' table is in.
- $connection = mysql_connect("$host","$db_username","$db_pass") or die ("Couldn't connect to server.");
- $db = mysql_select_db("$db_name", $connection) or die("Couldn't select database.");
- error_reporting (E_ALL ^ E_NOTICE);
- $salt = "ZKd88lUhsk21"; // creates a salt value to better encrypt the users password
- $mysql = mysql_query("SELECT * FROM users WHERE username='".safe($_COOKIE['username'])."' AND id='".safe($_COOKIE['id'])."' AND password='".safe($_COOKIE['password'])."'");
- $row = mysql_fetch_array($mysql);
- $registration_date = $row['regdate'];
- $email = $row['email'];
- $website = $row['website'];
- $location = $row['location'];
- $show_email = $row['show_email'];
- $mysql = mysql_query("SELECT * FROM users WHERE username='".safe($_COOKIE['username'])."' AND id='".safe($_COOKIE['id'])."' AND password='".safe($_COOKIE['password'])."'");
- $rows = mysql_num_rows($mysql);
- if($rows != 1) {
- $logged_in = 0;
- } else {
- $logged_in = 1;
- }
- function safe($input) {
- $valid_input = mysql_escape_string($input);
- return $valid_input;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement