pls ii need to display my result from the database into a table form using phph code. can soemone help out please

Member Avatar for Zagga

We're going to need a bit more information.
What code have you tried and which part of that code are you having trouble with?

start with:

<?php

define('DB_HOST', 'localhost');
define('DB_NAME', 'your_db');
define('DB_USER','yourpassword');
define('DB_PASSWORD','');

$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());
?>

then declare variable to query

$result = $mysqli->query( 'SELECT * FROM table_name ORDER BY item_id ASC');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.