Follow the Step:
Step 1: Select the host
Step2: Connect to the database
Step3:Create the fetch query to reterive all data
Step4. Use mysqli_fetch_array() function .
My Table look like
Index.php
Step 1: Select the host
Step2: Connect to the database
Step3:Create the fetch query to reterive all data
Step4. Use mysqli_fetch_array() function .
My Table look like
Index.php
<body>
 
<?php
$username
= "root";
$password
= "";
$hostname
= "localhost";
$database_name='registration';
$dbhandle
= mysqli_connect($hostname,$username,$password,$database_name)
or
die("Unable to connect to MySQL");
$query="select
*from user";
$abc=  mysqli_query($dbhandle,$query);
?>
 <center>
 <table border="1"
cellspacing="1" cellpading>
<tr>
 <td>Id</td>
<td>Name</td>
<td>Password</td>
<td>Email</td>
</tr>
<?php
while ($row = mysqli_fetch_array($abc))
{
 echo "<tr
align='center'>";
echo"<td><font
color='black'>" .$row['id']."</font></td>";
echo"<td><font
color='black'>" .$row['name']."</font></td>";
echo"<td><font
color='black'>". $row['password'].
"</font></td>";
echo"<td><font
color='black'>". $row['email']. "</font></td>";
echo "</tr>";
}
 ?>
</table>
</center>
    </body>


aha,,,verty nice trick,,i like that.
ReplyDelete