Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

asdfdd

By: a guest on Sep 17th, 2013  |  syntax: None  |  size: 0.50 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. header('Access-Control-Allow-Origin: *');
  3.  
  4. $con = mysql_connect("Mine1.psu-erie.bd.psu.edu","cmpsc497","cmpsc497");
  5.  
  6. if (!$con)
  7. {
  8. die('Could not connect: ' . mysql_error());
  9. }
  10.  
  11. mysql_select_db("cmpsc497", $con);
  12.  
  13.  
  14. $result = mysql_query("SELECT (`1`,`2`,`3`,`4`,`5`,`6`) FROM `cpk5040` ");
  15.  
  16.  
  17. if (!$result) {
  18.     die('Invalid query: ' . mysql_error());
  19. }
  20.  
  21. while ($rt = mysql_fetch_array($result)) {
  22.   foreach ($rt as $loc) {
  23.     echo $loc.'<br />';
  24.   }
  25. }  
  26.  
  27. mysql_close($con);
  28.  
  29. ?>