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

Posts
23
Registration date
Sunday February 17, 2019
Status
Member
Last seen
March 2, 2019
-
Hello,
I have this link on page1.php

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

And this is the code for page2.php

<?php
include'bddconnect.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.'';
}
?>
<html>
<body>
<?php print("$output"); ?>
</body>
</html>

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.
See more 

1 reply

Posts
13034
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1535
0
Thank you
One server has the inclide file, and one doesnt.
Respond to ac3mark