<?php
//get heroID
$heroID = $_REQUEST['heroID'];
$heroID = mysql_real_escape_string($heroID);
//connect to db
$db = mysql_connect("localhost", "user", "password") or die(mysql_error);
mysql_select_db("dbName");
//extract query
$query = "SELECT * FROM hero WHERE heroID = $heroID";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)){
foreach ($row as $name => $value){
print "$name: $value <br />";
}
} // end while
?>