Skip to content

Commit

Permalink
fix some issues in the file #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Deshan555 committed Nov 20, 2022
1 parent db154fd commit 8bc8092
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ class="img-fluid" style="border-radius: 1rem 0 0 1rem;"
<h5 class="fw-normal mb-3 pb-3" style="text-transform: uppercase; color: grey;"><b>Sign in with your sltc id</b></h5>


<?php if(isset($_GET['error_message'])){ ?>
<?php if(isset($_GET['error_message'])){ ?>+

<p id="error_message" class="text-center alert-danger"><?php echo $_GET['error_message'];?></p>

<?php }?>

<div class="form-outline mb-4">
<input type="text" id="form2Example17" class="form-control form-control-lg" name="email" />
<label class="form-label" for="form2Example17">Email address</label>
<label class="form-label" for="form2Example17">Email address/User Name</label>
</div>

<div class="form-outline mb-4">
Expand Down
35 changes: 35 additions & 0 deletions process_login.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

$conn = include('config.php');

if(isset($_POST['button']))
{
//include('config.php');

$email = $_POST['email'];

$password = md5($_POST['password']);

$stmt = $conn->prepare("SELECT User_ID, FULL_NAME, USER_TYPE, EMAIL, IMAGE, FACEBOOK, WHATSAPP, BIO, FALLOWERS, FALLOWING, POSTS FROM USERS WHERE USER_NAME = ? AND PASSWORD = ?");

$stmt->bind_param("ss", $email, $password);

$stmt->execute();

$stmt->store_result();

if($stmt->num_rows() > 0)
{
echo 'done';
}
else{

echo 'undo';
}
}
else{

echo 'error';
}

?>

0 comments on commit 8bc8092

Please sign in to comment.