I'm currently coding an e-commerce website for a school project hosted by MAMP where I need to link the product boxes to a description page using the $_GET variable. When I click on the boxes, they all link to a details.php page successfully. However, the redirected page is blank and only has a background color and my nav bar. The php code doesn't echo any strings or variables or even the html text. I've used a php syntax checker to check the code and there is no error!! I'm so confused.
Would really appreciate the help.
The code below is the php text I have on my details page.
<?php
if(isset($_GET['comp_id'])){
$company_id = $_GET['comp_id'];
$sql = "SELECT * FROM company WHERE id = '$company_id;";
$result = mysqli_query($conn,$sql);
while ($row = mysqli_fetch_array($result)){
$comp_image = $row ['image'];
$comp_name = $row ['name'];
$comp_location= $row ['location'];
$comp_position = $row ['position'];
$comp_duration = $row ['duration'];
$comp_description = $row['description'];
$comp_applink= $row['form'];
echo "
<h1>Hello</h1>
";
}
}
?>