Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string awsurl = "ec2-174-129-82-141.compute-1.amazonaws.com/connect_to_server.php";
- IEnumerator GetScores()
- {
- print("get scores start");
- WWW aws_get = new WWW(awsurl);
- yield return aws_get;
- print("getscore here");
- if (aws_get.error != null)
- {
- print("There was an error getting aws: " + aws_get.error);
- }
- else
- {
- print(aws_get.text); // this is a GUIText that will display the scores in game.
- }
- }
- $address = "localhost"
- $dbusername = "root";
- $dbpassword = "root";
- $db_name = "watshoes";
- $db_conn = new mysqli($address, $dbusername, $dbpassword, $db_name);
- if(isset($_POST['username'])) $username = $_POST['username'];
- if(isset($_POST['user_id'])) $user_id = $_POST['user_id'];
- if(isset($password)) $password =$_POST['password'];
- $stmt = $db_conn->prepare("SELECT image FROM ImageText");
- // "s" means the database expects a string
- $stmt->bind_param("s", $user_id);
- if($stmt->execute())
- {
- /* bind result variables */
- $stmt->bind_result($image);
- /* fetch value */
- $stmt->fetch();
- echo $image;
- }
- else
- {
- echo "query failed";
- }
- $stmt->close();
- $db_conn->close();
Add Comment
Please, Sign In to add comment