MADTinus
-
Posts
2 -
Joined
-
Last visited
Posts posted by MADTinus
-
-
Hello there,
I've made a very simple file to put some requested data in a tabel-form. Somehow first the output starts with about 60-70 blank lines, and then the output. Somewere I made a mistake, but the longer I look, the harder it get tot see.
Please can someone show me the mistake. See below/
Thanks,
Martin.
Programlines:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Output data from Complex</title></head><?php# MRouw: deze file maakt de connectie met de databaserequire ('connectdb.php');// MRouw: hier haal je de gewenste velden op uit de gewenste tabel$sql = "SELECT Complexnaam, Adres, Plaats FROM complex";$result = $conn->query($sql);# Heater-rowecho "<table border=2 cellpadding=0 cellspacing=0>";echo "<td><b>Complexnaam</b></td><td><b>Adres</b></td><td><b>Plaats</b></td>";while($row = $result->fetch_assoc()) {echo '<tr><td>' . $row['Complexnaam'] . '</td><td>' . $row['Adres'] . '</td><td>' . $row['Plaats'] . '</td></tr><br>';;}$conn->close();?>
Blank lines in output
in PHP Coding Help
Posted
Thank you very mutch, this was the mistake.
Now my code works.