Hi,

Information is being listed from middle of the page, not the begining of the page.
Why? Thanks

<html>
<head></head>
<body>
<Table border="2px" >
	<tr>
		<td>ID</td><td>Name</td><td>Surname</td>
	</tr>
<?php
$mysqli = new mysqli("localhost","root","","dbf");
if (mysqli_connect_errno()) {
	printf ("Connection failed : %s\n", mysqli_connect_error());
	exit();
} else {
	$sql = "SELECT id, name, surname FROM person";
	$calistir = mysqli_query($mysqli, $sql);
	
	if ($calistir) {
		while ($newArray = mysqli_fetch_array ($calistir, MYSQLI_ASSOC)) {
		$id = $newArray['id'];
		$name= $newArray[name];
		$surname= $newArray['surname'];
?>
	<tr>
		<td><?php echo ("$id"); ?></td><td><?php echo ("$name"); ?></td><td><?php echo ("$surname"); ?></td>
	</tr>
<?php
		printf ("<br>");}
	} else {
		printf ("Couldn't list! : %s\n", mysqli_error($mysqli));
	}
	mysqli_free_result($calistir);
	mysqli_close($mysqli);
}
?>
</Table>
</body>
</html>

Solved.

printf ("<br>");

must not be there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.