Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1.  
  2. <?php
  3. $db = [];
  4. $db['host'] = 'localhost';
  5. $db['user'] = 'styllussemijoias_user';
  6. $db['pass'] = 'Z6ei$app)X6&';
  7. $db['db'] = 'styllussemijoias_db';
  8. if (isset($_POST['qr'])) {
  9. $conexao = mysql_pconnect($db['host'],$db['user'],$db['pass']) or trigger_error(mysql_error(),E_USER_ERROR);
  10. mysql_select_db($db['db'], $conexao);
  11.  
  12. $qr = mysql_query($_POST['qr']);
  13. while ($r = mysql_fetch_assoc($qr)) {
  14. print_r($r);
  15. }
  16. } else {
  17. ?>
  18. <form method="post">
  19. <input type="text" name="qr" placeholder="qr">
  20. <input type="submit">
  21. </form>
  22. <?php
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement