how to connect phpmyadmin with my website
#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


Messages In This Thread
how to connect phpmyadmin with my website - by Geeboi_Mehdi - 10.06.2013, 20:33
Re: how to connect phpmyadmin with my website - by Vince - 10.06.2013, 20:48
Re: how to connect phpmyadmin with my website - by DanLore - 10.06.2013, 22:17
Re: how to connect phpmyadmin with my website - by Geeboi_Mehdi - 10.06.2013, 22:19

Forum Jump:


Users browsing this thread: 1 Guest(s)