Advertisement
michaelyuen

Untitled

Jun 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2. if ($stmt = $link->prepare("SELECT username FROM registrations WHERE phone = ? AND age = ? ")) {
  3.  
  4.     $stmt->bind_param("si", $phone, $age); <==
  5.     // bind placeholder (?) by sequence ie. first placeholder would be string (s) and use $phone value
  6.     $phone = $_SESSION[phone];
  7.     $age = 18; <===
  8.     if ($stmt->execute()) {
  9.         $result = $stmt->get_result();
  10.         if ($result->num_rows > 0) {
  11.             while ($row = $result->fetch_assoc()) {
  12.  
  13.  
  14.             }
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement