Guest User

Untitled

a guest
May 3rd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. //database settings
  3.  
  4. $host = "you dont need this";
  5. $username = "davo";
  6. $password = "or this";
  7. $db = "or this";
  8. $db_table = "y4m";
  9.  
  10. mysql_connect("$host", "$username", "$password") or die ("could not connect to the database");
  11. mysql_select_db("$db")or die("can't select database");
  12.  
  13. $artist = mysql_real_escape_string($_POST['artist']);
  14. $album = mysql_real_escape_string($_POST['album']);
  15. $self = $_REQUEST['id'];
  16.  
  17. $sql = "SELECT * FROM $db_table WHERE ID = '$self'";
  18. $result = mysql_query($sql);
  19.  
  20. print_r($result);
  21. mysql_close();
  22. ?>
Add Comment
Please, Sign In to add comment