SHARE
TWEET

Untitled

a guest Jul 17th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include 'includes/db.php';
  3. if(isset($_POST['userid']))
  4. {
  5.     $result='';
  6.     $userid = $_POST['userid'];
  7.     $sql = 'SELECT * FROM users WHERE userid = :userid';
  8.     $stmt = $conn->prepare($sql);
  9.     $stmt->bindParam(':userid', $userid, PDO::PARAM_STR);
  10.     $stmt->execute();
  11.     if($stmt->rowCount())
  12.     {
  13.         while ($row = $stmt->fetch(PDO::FETCH_ASSOC))
  14.         {
  15.             $result="true,".$row['fullname'].",".$row['mobile'].",".$row['make'].",".$row['model'].",".$row['rn'];
  16.         }
  17.     }  
  18.     elseif(!$stmt->rowCount())
  19.     {
  20.         $result="false";
  21.     }
  22.     echo $result;
  23. }
  24. ?>
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top