0

while running with my php code in local server, it runs without errors, but when I add it to live server, it's displaying blank (white space), below is the php code.

<?php

    include('config.php');


    /*** query the database ***/

    $room_sql="SELECT * FROM special WHERE room_id='1'";
    $result = db::getInstance()->query($room_sql);

    /*$rows = $result->fetch(PDO::FETCH_ASSOC);*/


    while($rows = $result->fetch())
    {
        $description=$rows['description'];
        $price=$rows['price'];
        $room_id=$rows['room_id'];
        $bed_type=$rows['bed_type'];
        $image=$rows["image"];


    }
?>


<div class="contend_2">
     <p id="topic"><?php echo $bed_type; ?> Bed <input type="hidden" name="bed_type" value="<?php echo $bed_type; ?>"/></p>
     <div><?php echo '<img src="admin/'. $image.'" width="260" height="80" />'; ?></div>
     <p id="contend"><?php echo $description; ?></p>
     <p id="contend">Our Special Package : <?php echo $price; ?> <input type="hidden" name="price" value="<?php echo $price; ?>"/></p>
     <input type="hidden" name="room_id" value="<?php echo $room_id; ?>"/>
     <input type="submit" value="Book Now" id="btn"/>
</div>
George G
  • 7,443
  • 12
  • 45
  • 59
KT1
  • 311
  • 2
  • 4
  • 13

0 Answers0