Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server_host = "mysql-omarsdajani.alwaysdata.net";
- $server_username = "141592";
- $server_password = "ben10ben10";
- $server_dbName = "omarsdajani_hustlehut";
- $player_email = $_POST ["emailPost"];
- $player_password = $_POST ["passwordPost"];
- $conn = mysqli_connect ($server_host, $server_username, $server_password, $server_dbName);
- if (!$conn) {
- echo ("Could not connect to the server.");
- }
- $findPlayer = mysqli_query ($conn, "SELECT * FROM Users WHERE Email = '$player_email'");
- if (mysqli_num_rows ($findPlayer) > 0) {
- while ($row = mysqli_fetch_assoc ($findPlayer)) {
- if (password_verify ($player_password, $row['Password'])) {
- echo ("Signed in");
- echo ("|ID:" . $row['ID'] . "|Email:" . $row['Email'] . "|Username:" . $row['Username'] . "|Name:" . $row['Name'] . "|Date Registered:"
- . $row['Date_Registered'] . "|Goal:" . $row['Goal'] . "|System:" . $row ['System'] . "|Starting BFP:" . $row ['Starting_BFP'] .
- "|Starting Weight:" . $row ['Starting_Weight'] . "|Cal Goal:" . $row ['Cal_Goal'] . "|Carb Goal:" . $row ['Carb_Goal'] .
- "|Protein Goal:" . $row ['Protein_Goal'] . "|Fat Goal:" . $row ['Fat_Goal'] . "|Current Carbs:" . $row ['Current_Carb'] .
- "|Current Protein:" . $row ['Current_Protein'] . "|Current Fat:" . $row ['Current_Fat'] . "|Current Cals:" . $row ['Current_Cals']
- . "|Current BFP:" . $row ['Current_BFP'] . "|Current Weight:" . $row ['Current_Weight']);
- } else {
- echo ("Incorrect password");
- }
- }
- } else {
- echo ("Incorrect email");
- }
Add Comment
Please, Sign In to add comment