php - display all data from my User table in my database -
my question how display data users table in database? have this.
$loop = mysql_query(“show users $dbname”) or die (‘cannot select tables’);
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $result = mysql_query(“select * users”, $link) or die (‘cannot select tables’); while ($row = mysql_fetch_assoc($result)) { echo $row['firstname']; echo $row['lastname']; echo $row['address']; echo $row['age']; } mysql_free_result($result);
Comments
Post a Comment