Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('assets/system/core.php');
- if (isset($_POST['password'])) {
- $npassword = mysqli_query($db, "SELECT * FROM users WHERE password = 'password'");
- if ($l_query->num_rows > 0) {
- while($row = $l_query->fetch_assoc()) {
- $userid = $row["id"];
- }
- }
- elseif(mysqli_num_rows($l_query) == 0)
- {
- echo '<div id="alert-error">Senha está incorreta!</div>';
- $passerror = true;
- }
- }
- if (isset($_POST['npassword'])) {
- $npassword = mysqli_query($db, "UPDATE users SET password='".$_POST['npassword']."' WHERE username='".$_SESSION['loginuser']."'");
- {
- echo '<div id="alert-green">Você foi registrado corretamente!</div>';
- }
- }
- echo '
- <div class="wrapper-me">
- <div class="right-content" style="margin-left: 5px">
- <div id="box" style="min-height: 400px; max-height: 1200px;">
- <div id="blue-title" style="background: #27ae60; border: 1px solid #27ae60">
- <h1 id="title-config">Alterar minha senha</h1>
- <i style="color:#e0e0e0;" class="ion-edit"></i>
- </div>
- <div id="content-config" style="height: auto;">
- <form action="" method="post" autocomplete="off">
- <input type
- <input type="password" name="password" placeholder="Senha atual" class="button-contn1"/>
- <input type="password" name="npassword" placeholder="Nova senha" class="button-contn1"/>
- <input type="submit" value="Continuar" class="button-contn">
- </form>
- </div> '
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement