SHARE
TWEET

Untitled

a guest Jun 14th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. database name test_db
  2. database table test_table
  3.  
  4.  
  5. <?php
  6.  
  7. $dbhost = 'localhost';
  8. $dbuser = 'dave';
  9. $dbpass = 'davepass';
  10. $dbname = 'test_db';
  11.  
  12. $conn = mysql_connect($dbhost, $dbuser, $dbpass)
  13.     or die  ('Error connecting to mysql');
  14.  
  15.  
  16. mysql_select_db($dbname);
  17.  
  18. $result = mysql_query("SELECT user FROM test_table WHERE id=1 AND email=test.test.com");
  19.  
  20. echo "The user name is: '$result'";
  21.  
  22.  
  23. mysql_close($conn);
  24.  
  25. ?>
  26.  
  27.  
  28. i get this error
  29.  
  30.  
  31. The user name is: 'Resource id #2'
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