Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<div class="form-group">
<label for="inputPassword">Password</label>
<input type="password" name="inputPassword" class="form-control" id="inputPassword" />
</div>
<label for="inputPassword">Teamid</label>
<input type="number" name="inputteamid" class="form-control" id="inputteamid" />
</div>
<button name="btnSubmit" type="submit" class="btn btn-primary" value="submit">
Submit
</button>
Expand All @@ -26,8 +28,9 @@
<?php
if(isset($_POST['btnSubmit'])){
$password = $_POST['inputPassword'];
$teamid = $_POST['inputteamid'];
$var = 1;
echo "You entered $password";

// if($password != "Allahis1"){
// echo "wrong username or password";
// exit;
Expand All @@ -53,6 +56,8 @@

$sql1 = "SELECT * FROM tbl_team LEFT JOIN tbl_member ON tbl_team.team_id = tbl_member.team_id";
$value = $conn->query($sql1);
$query="update tbl_team set team_payment='$var' where team_id='$teamid'";
$q2=$conn->query($query);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//You forgot the exception handling.

if(empty($value)){
echo "team id is empty";
exit;
Expand Down Expand Up @@ -103,4 +108,4 @@

<?php
}
?>
?>