php game stats

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Fri Nov 30, 2012 11:46 am

php game stats

Postby numnut3000 » Fri Nov 30, 2012 12:02 pm

hi everyone thanks for looking in

im trying to make some game stats and this part i really cant get my head around im looking
to have a result like this " today (date) you have killed 23 (kills) enemies your average kill is 1 kill per 1 min and 24 secs"
how can work this out ?

$data_array = "";

if (isset($_POST['myrequest'])&&$_POST['myrequest']== "get_data_array"){
$results=mysql_query("SELECT * from gamestats WHERE member='numnut'");

while($row = mysql_fetch_array($results)){
$kills = $row["kills"];
if($i == 1){
$data_array .= "$member|$date|$kills";
$data_array .= "(||)$member|$date|$kills";


echo "returnstring=";echo"$data_array";

Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 6 guests