how to connect phpmyadmin with my website
#1

i was wondering how can i make my website show statistics from data from phpmyadmin like shows players stats etc
Reply
#2

You mean MySQL. phpMyAdmin is just a graphical interface.

You need to know PHP. If you don't know this or don't want to learn it then I'd advice downloading a ready made control panel.
Reply
#3

Well, here's a start...

PHP код:
<?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);
?>
I'm using MySQLi as mysql_ is deprecated as far as I know. The other option might be PDO, but that's not necessarily needed. The queries above are fictional, don't expect them to work without some edits to match your database.
Reply
#4

wow thanks guys can you tell me some more about this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)