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

Closed
Anonymous User - Updated on Mar 2, 2019 at 12:23 PM
 Blocked Profile - Mar 4, 2019 at 11:40 AM
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.
Related:

1 response

Blocked Profile
Mar 4, 2019 at 11:40 AM
One server has the inclide file, and one doesnt.
0