Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //ob
- ob_start();
- //session
- session_start();
- //database shit
- $con=mysqli_connect("localhost","hardwell","aiw3o8A06uIZVGVd","forum_db");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- // ...some PHP code for database "my_db"...
- // Change database to "test"
- mysqli_select_db($con,"forum_db");
- // ...some PHP code for database "test"...
- mysqli_close($con);
- //Connection ENd here
- //set call function.php
- require 'forum/includes/functions.php';
- //Main PHP STAT HERE
- if (isset($_POST['login']))
- {
- //form valus
- $username =addslashes (strip_tags(strtolower($_POST['usernamed'])));
- $password =addslashes (strip_tags($_POST['passwordd']));
- if (!$username|| !$password)
- echo "Passowrd plz";
- else
- {
- //Find user
- $find = mysql_query($con,"SELECT * FROM phpbb_users WHERE username_clean='$username'");
- if(mysql_num_rows($find)==0)
- echo "username fail";
- else{
- while($find_row = mysql_fetch_assoc($find))
- {
- //password
- $password_hash = $find_row['user_password'];
- }
- echo $password_hash;
- }
- }
- }
- ?>
- <form action="login.php" method="POST">
- username: <br />
- <input type="text" name="usernamed"> <p/>
- Passowrd : <br />
- <input type="password" name="passwordd"><p/>
- <input type="submit" name="login" value="log in">
- </form>
Add Comment
Please, Sign In to add comment