This would echo $koe value to browser which you can echo to game using "Ajax.LastData" method. So whats up with $koe? In "$koe = stripslashes($row[3])" line Im looking third row from database, here is
example setup:
highcores table: ID, name, score.
now when we look at this, "score" is third row which is why we echoed it since we wanted score.
At websites (where we we have this script) we echoed $koe Ajax.LastData got one value which was $koe (score from database). You can use this method to dig out information from database to your game, modify script for your needs. To save up some time, you can also do few if/elseif things in script to define what exactly script is looking.
Example
"http://website.com/get.php?pid=score&name="&name
example code at PHP page.
<?php if $_REQUEST["pid"] == "score") { mysql code for score search };
elseif ($_REQUEST["pid"] == "avatar") { mysql code for avatar search ; }?>
Now you have to only change "pid=score" line from ajax request to match score or avatar and your PHP script would echo information you need without need to setup more complex thing. To get image, I assume you could echo full URL, for example check this file: dl.dropbox.com/u/59009902/load_image_from_url.capx
Hopefully this helps abit, I assume you wanted more simple and short answer but I figured that small tutorial would help others who are looking for answer to same problem.
This is not perfect solution but worked for me, tho I was searching and taking larger amount of data but idea is same. Feel free to send me private message if you need more detailed help.