Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string db_url="http://localhost/";
- IEnumerator SaveAllPlayerPrefs(object[] parms)
- {
- string ourPostData = "{"bone":"42"}";
- Hashtable headers = new Hashtable();
- headers.Add("Content-Type", "application/json");
- headers.Add("Cookie", "Our session cookie");
- byte[] pData = System.Text.Encoding.UTF8.GetBytes(ourPostData);
- WWW webRequest = new WWW(db_url + "SaveAllPlayerPref.php", pData, headers);
- yield return webRequest;
- }
- <?php
- $sql_connect = mysql_connect("localhost", "root", "") or die ("no DB Connection");
- mysql_select_db("example") or die ("DB not found");
- $bone = $_POST['bone'];
- mysql_query("INSERT INTO save_game (bone) VALUES ('$bone');");
- mysql_close($sql_connect);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement