This example illustrates how to display result on the browser and how to use the result in the php application.
This example illustrates how to display result on the browser and how to use the result in the php application.This example illustrates how to display result on the browser and how to use the result in the php application.
In this example we create a select query by using mysql_query method and stored it in the result variable which indicate by $ (dollar sign). Here we display the result in form of html table but as per your requirement we display the table in normal form by using like:
while($row = mysql_fetch_array($result)){ echo $row['username'] . " " . $row['email']; echo "<br>"; } |
Table: users
Source Code of sql_result.php
<?php
|
Output: