Same code working on 000webhost online server but not on both wamp and xampp [Closed]

 Blocked Profile -
I have this link on page1.php

<a href="page2.php?word=abandon">abandon</a>

And this is the code for page2.php

$output = '';
$word = $_GET['word'];
$query = "SELECT * FROM table1 WHERE word='$word'";
$result = mysqli_query($con, $query);
while($row = mysqli_fetch_array($result))
$word= $row['word'];
$definition = $row['definition'];
$id = $row['id'];
$output .= ''.$word.'<br>'.$definition.'';
<?php print("$output"); ?>

So as mentioened in the title this code doesn't and dispays a blank white page while wamp or xampp server but this same code works fine on 000webhost online server and displays the word and definition when clicking link.
Is there any explanation to this ?
Thank you in advance.

1 reply

One server has the inclide file, and one doesnt.