SHARE
TWEET

Untitled

a guest Jun 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $stmt = $mysqli->prepare("SELECT * FROM myTable WHERE name = ?");
  2. $stmt->bind_param("s", $_POST['name']);
  3. $stmt->execute();
  4. $result = $stmt->get_result();
  5. if($result->num_rows === 0) exit('No rows');
  6. while($row = $result->fetch_assoc()) {
  7.   //do some stuff
  8. }
  9. var_export($ages);
  10. $stmt->close();
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