GWibisono

konek mysqli dgn tambahan2

Jan 20th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. begin testing<?php
  2. echo "siap???";
  3. error_reporting(E_ALL);
  4. $db = new mysqli("localhost","root","toor","db");
  5. if (mysqli_connect_errno()) {
  6. printf("Connect failed: %s\n", mysqli_connect_error());
  7. exit();
  8. }
  9. $query = "select * from tbl_users";
  10. $result = $db->query($query);
  11. echo $result->username;
Advertisement
Add Comment
Please, Sign In to add comment