Advertisement
michaelyuen

Untitled

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