10.06.2013, 20:33
i was wondering how can i make my website show statistics from data from phpmyadmin like shows players stats etc
<?php
// Connect to your database (as Vince explained, phpMyAdmin is merely an interface)
$mysqli = new mysqli("localhost", "user", "pass", "db_name");
// Query your stats table? $user_id is a fictitious variable..
$tableQuery = $mysqli->query("SELECT * FROM `stats_table` WHERE `id` = '1'");
// Fetch an array for the data
$user = $mysqli->fetch_array(MYSQLI_BOTH);
?>