Guest User

Untitled

a guest
Apr 25th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. $host="127.0.0.1";
  4. $user="user";
  5. $pass="pass";
  6. $database="database";
  7. $table="table";
  8.  
  9.  
  10.  
  11. $db=mysql_connect($host, $user, $pass);
  12. if(!$db)
  13. die(mysql_error());
  14. $db=mysql_select_db($database);
  15. if(!$db)
  16. die(mysql_error());
  17.  
  18. $nh = $_GET['n'];
  19.  
  20. if ( $nh )
  21. {
  22. echo "$nh<br>";
  23.  
  24. $res=mysql_query("SELECT * FROM $table WHERE nfo_rlsname ='$nh'");
  25.  
  26. if(mysql_num_rows($res) > 0)
  27. {
  28. $row=mysql_fetch_array($res);
  29. echo "{$row['nfo_data']}";
  30. }
  31. else
  32. {
  33. echo "Nothing found";
  34. }
  35. }
  36. else
  37. {
  38. echo "No input";
  39. }
  40. ?>
Add Comment
Please, Sign In to add comment