Jump to content

[SOLVED] Not echoing HTML table


grahamb314

Recommended Posts

Hi all

 

Just a small problem:

i have this:

 

(

<?php
require('../mysql_connect.php');


$result = mysqli_query($mysqli, "SELECT * FROM `grahamb_test`.`booking`");

echo "<table border='1'>
<tr>
<th>Name</th>
<th>Slot</th>
<th>Day</th>
<th>Month</th>
<th>Year</th>
</tr>";

while($row = @mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['name'] . "</td>";
  echo "<td>" . $row['slot'] . "</td>";
  echo "<td>" . $row['day'] . "</td>";
  echo "<td>" . $row['month'] . "</td>";
  echo "<td>" . $row['year'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

?>

 

require('../mysql_connect.php')

connects the the DB fine

 

The output source I get is:

<table border='1'>
<tr>
<th>Name</th>
<th>Slot</th>
<th>Day</th>
<th>Month</th>
<th>Year</th>
</tr></table>echo $day;
	echo ' ';
	echo $month;
	echo ' ';
	echo $year;
	echo' at ';
	echo $slot;
	echo ' by ';
	echo $name;

Any thoughts?

Link to comment
https://forums.phpfreaks.com/topic/128425-solved-not-echoing-html-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.