0

I want it to display in this format.

format

Table in the database

table

But it does show up like this.

line

But what I want to show is the information in a row.

I USE THAIS CODE

<?php


$bdaytime = $_GET['bdaytime'];
$bdaytime2 = $_GET['bdaytime2'];

include "connect_db.php";
$sql = "SELECT
*

FROM
wp_cf7_data, wp_cf7_data_entry

WHERE
wp_cf7_data.id=wp_cf7_data_entry.data_id and cf7_id = 1470 AND name in ('your-name','your-email') and  wp_cf7_data.created  BETWEEN '$bdaytime' and '$bdaytime2' ORDER BY data_id ASC ";



$query = mysqli_query($conn, $sql);
$num=mysqli_num_rows($query);

?>

<table width="600" border="1">

  <tr>

    <th width="91"> <div align="center">id </div></th>
    <th width="98"> <div align="center">date </div></th>
<th width="59"> <div align="center">email</div></th>
    <th width="59"> <div align="center">name </div></th>

  </tr>
<?php
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
{
?>
  <tr>
    <td><div align="center"><?php echo $result["data_id"];?></div></td>
    <td><?php echo $result["created"];?></td>
    <td align="right"><?php echo $result["name"];?></td>
    <td align="right"><?php echo $result["value"];?></td>

  </tr>
  <?php echo $result["numberOfRows"];


?>
<?php
}
?>

Sorry i'm not good english

thank you

Community
  • 1
  • 1

0 Answers0