setting ints in the game as values from an online database?

I have a problem. The database stores multiple values from the player (such as the username, password, and the amount of in-game currency the player has). When the player logs into the game, a php file “echos” the data the player has stored in the database. The client then recieves the echo and uses it to load the player’s stats. The php file echos the data as demonstrated in this code:

==========================================
//Example login php file.

<?PHP $username = $_POST['username']; $passcode = $_POST['passcode']; $conn = mysqli_connect("fdb3.awardspace.net","Database name","Database Password"); if($conn){ mysqli_select_db($conn,"Database name"); $check = mysqli_query($conn,"SELECT * FROM PlayerStats WHERE `username` = '".$username."' AND `passcode` = '".$passcode."'"); $numrows = mysqli_num_rows($check); if($numrows == 0){ die("username does not exist or the password is incorrect !"); }else{ while($row = mysqli_fetch_assoc($check)){ echo $row['username'] ."/". $row['passcode'] ."/". $row['plyrgold'] ."/" ; } } }else{ die("Failed to connect to database. "); } mysqli_close($conn); ?>

=================================================

The problem is, how would I get the data to set an int such as:
private int plyrgold = ???;
from the string that the php file echoed? How would I parse this? I am using C# code, and awardspace.net to create this system. Thanks

Echo is basically tantamount to print as you are probably aware I think. I had a similar situation in a project I worked on in college.

Forgive me if I’m stating the obvious/or are being plain wrong but from what I can remember:

I am assuming your PhP code is being executed client side rather than server side as is traditional sense, and echo basically is the equivalent of a print statement in most other languages if I remember correctly from PhP.

The way I got around it was by writing the data to a temporary text file then read it back in using Python parsing it appropiately, although you would do this in C# I assume, and it can then be assigned to variables as deemed appropriate.

Hope it’s of some use :).

Actually, the phps and databases are both server side. How it works is the client sends WWWForms to a url which is the php file, then the php file relays that info to the database.

I have made a few changes to the system, Now the php scripts echo the player’s gold amount in the form of an int.
In C#, how can I get the client to take that int, and set it as an integer in the player’s prefab script?

Could I just use:

private int playergold;

playergold = login.text;

???

(login.text is there because it is the Int the php file echos).
no longer is their one php file that sends data to the client, but multiple. Each php is assigned the specific data it is sopposed to send to the client. There is one for the amount of gold the player has, his strength level, and his defense level.