daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Sep 22nd, 2016 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  require_once('assets/system/core.php');
  4.  
  5.      if (isset($_POST['password'])) {
  6.  
  7.     $npassword = mysqli_query($db, "SELECT * FROM users WHERE password = 'password'");
  8.  
  9.     if ($l_query->num_rows > 0) {
  10.             while($row = $l_query->fetch_assoc()) {
  11.                 $userid = $row["id"];
  12.             }
  13.         }
  14.     elseif(mysqli_num_rows($l_query) == 0)
  15.     {
  16.         echo '<div id="alert-error">Senha está incorreta!</div>';
  17.         $passerror = true;
  18.     }
  19. }
  20.  
  21.      if (isset($_POST['npassword'])) {
  22.  
  23.     $npassword = mysqli_query($db, "UPDATE users SET password='".$_POST['npassword']."' WHERE username='".$_SESSION['loginuser']."'");
  24.  
  25.     {
  26.         echo '<div id="alert-green">Você foi registrado corretamente!</div>';
  27.     }
  28. }
  29.  
  30.     echo '
  31.     <div class="wrapper-me">
  32.         <div class="right-content" style="margin-left: 5px">
  33.             <div id="box" style="min-height: 400px;  max-height: 1200px;">
  34.                 <div id="blue-title" style="background: #27ae60; border: 1px solid #27ae60">
  35.                     <h1 id="title-config">Alterar minha senha</h1>
  36.                     <i style="color:#e0e0e0;" class="ion-edit"></i>
  37.                 </div>
  38.                 <div id="content-config" style="height: auto;">
  39.                     <form action="" method="post" autocomplete="off">
  40.                     <input type
  41.                       <input type="password" name="password" placeholder="Senha atual" class="button-contn1"/>
  42.                        <input type="password" name="npassword" placeholder="Nova senha" class="button-contn1"/>
  43.                       <input type="submit" value="Continuar" class="button-contn">
  44.                     </form>
  45.                     </div> '
  46.  
  47.  
  48.     ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top