Advertisement
Guest User

asdfdd

a guest
Sep 17th, 2013
74
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. 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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement