Guest User

Untitled

a guest
Oct 3rd, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. // Make a MySQL Connection
  3. mysql_connect("localhost", "macca", "macca912") or die(mysql_error());
  4. mysql_select_db("test") or die(mysql_error());
  5.  
  6. // Retrieve all the data from the "*****" table
  7. $result = mysql_query("SELECT * FROM ******")
  8. or die(mysql_error());
  9.  
  10. // store the record of the "*****" table into $row
  11. $row = mysql_fetch_array( $result );
  12. // Print out the contents of the entry
  13.  
  14. echo "UserName: ".$row['name'];
  15. echo " password: ".$row['password'];
  16.  
  17. ?>
  18.  
  19. (edited due to names)
Add Comment
Please, Sign In to add comment