Guest User

Untitled

a guest
Dec 2nd, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. public string awsurl = "ec2-174-129-82-141.compute-1.amazonaws.com/connect_to_server.php";
  2. IEnumerator GetScores()
  3. {
  4. print("get scores start");
  5. WWW aws_get = new WWW(awsurl);
  6. yield return aws_get;
  7. print("getscore here");
  8. if (aws_get.error != null)
  9. {
  10. print("There was an error getting aws: " + aws_get.error);
  11. }
  12. else
  13. {
  14. print(aws_get.text); // this is a GUIText that will display the scores in game.
  15. }
  16. }
  17.  
  18. $address = "localhost"
  19. $dbusername = "root";
  20. $dbpassword = "root";
  21. $db_name = "watshoes";
  22. $db_conn = new mysqli($address, $dbusername, $dbpassword, $db_name);
  23. if(isset($_POST['username'])) $username = $_POST['username'];
  24. if(isset($_POST['user_id'])) $user_id = $_POST['user_id'];
  25. if(isset($password)) $password =$_POST['password'];
  26.  
  27. $stmt = $db_conn->prepare("SELECT image FROM ImageText");
  28. // "s" means the database expects a string
  29. $stmt->bind_param("s", $user_id);
  30. if($stmt->execute())
  31. {
  32. /* bind result variables */
  33. $stmt->bind_result($image);
  34. /* fetch value */
  35. $stmt->fetch();
  36. echo $image;
  37. }
  38. else
  39. {
  40. echo "query failed";
  41. }
  42. $stmt->close();
  43. $db_conn->close();
Add Comment
Please, Sign In to add comment